In this example, we use Alpine.js to add a smooth animation as Livewire fetches new entries. Check out the code below to see how straightforward the setup is! For a deeper dive, visit the animations documentation.

ready_audi_a3_2013.jpg
Audi A3 Cabrio
Seats: 4
Doors: 2
Transmission: Manual
Fuel: Unleaded
Model year: 2020
ready_audi_q3_2012.jpg
Audi Q3 Turbo Diesel
Seats: 5
Doors: 5
Transmission: Manual
Fuel: Diesel
Model year: 2022
ready_citroen_c4_grand_2015.jpg
Citroen C4 Grand Picasso Automatic
Seats: 7
Doors: 5
Transmission: Automatic
Fuel: Diesel
Model year: 2022
ready_citroen_spacetourer_2019.jpg
Citroen SpaceTourer Automatic
Seats: 7
Doors: 5
Transmission: Automatic
Fuel: Diesel
Model year: 2021
ready_fiat_500_cabrio_2015.jpg
Fiat 500 Cabrio Automatic
Seats: 2
Doors: 2
Transmission: Automatic
Fuel: Unleaded
Model year: 2021
ready_fiat_panda_2012.jpg
Fiat Panda
Seats: 4
Doors: 4
Transmission: Manual
Fuel: Unleaded
Model year: 2023
ready_hyundai-i10_2018.jpg
Hyundai i10
Seats: 4
Doors: 4
Transmission: Manual
Fuel: Diesel
Model year: 2023
ready_hyundai-i10_2018.jpg
Hyundai i10 Automatic
Seats: 4
Doors: 4
Transmission: Automatic
Fuel: Unleaded
Model year: 2021
ready_hyundai-i20_2013.jpg
Hyundai i20
Seats: 5
Doors: 4
Transmission: Manual
Fuel: Unleaded
Model year: 2021
ready_hyundai_i30_2013.jpg
Hyundai i30
Seats: 5
Doors: 5
Transmission: Manual
Fuel: Diesel
Model year: 2025
ready_jeep_hummer_h3_2010.jpg
Jeep Hummer H3
Seats: 5
Doors: 4
Transmission: Automatic
Fuel: Diesel
Model year: 2020
ready_kia_picanto_2015.jpg
Kia Picanto
Seats: 4
Doors: 4
Transmission: Manual
Fuel: Unleaded
Model year: 2023
File Code Streamline Icon: https://streamlinehq.com file-code
Example's code
1<div
2 x-data="{ loading: false }"
3 x-init="
4 $wire.on('filter-updated', () => {
5 loading = true;
6 });
7 $wire.on('entries-updated', () => {
8 setTimeout(() => {
9 loading = false;
10 }, 150);
11 });
12 "
13>
14 {{ if (entries | length) > 0 }}
15 <div class="grid grid-cols-1 @2xl:grid-cols-2 @5xl:grid-cols-3 @6xl:grid-cols-4 gap-8">
16 {{ entries }}
17 <div
18 class="flex flex-col bg-gray-100 h-full rounded p-4 transition-all duration-300 ease-out"
19 wire:key="{{ id }}"
20 x-data="{ index: {{ index }} }"
21 x-bind:style="`transition-delay: ${loading ? '0ms' : (index * 50) + 'ms'}`"
22 x-bind:class="loading ? 'opacity-0 scale-95 translate-y-4' : 'opacity-100 scale-100 translate-y-0'"
23 >
24 {{# Rest of the entry template #}}
25 </div>
26 {{ /entries }}
27 </div>
28 <div class="mt-12 flex justify-center">
29 {{ links }}
30 </div>
31 {{ else }}
32 <div class="text-center">
33 <div class="text-2xl font-bold mb-4">No results found</div>
34 <div class="text-gray-500">Try adjusting your filters.
35 </div>
36 {{ /if }}
37</div>