Skip to content

Commit ce81cee

Browse files
✨ Add animation to asset list on scroll into view
1 parent 9cbe158 commit ce81cee

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

resources/views/brand.blade.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,23 @@ class="mx-auto max-w-3xl pt-4 text-base/relaxed text-pretty text-gray-600 sm:tex
110110

111111
{{-- List --}}
112112
<div
113+
x-init="
114+
() => {
115+
motion.inView($el, (element) => {
116+
gsap.fromTo(
117+
Array.from($el.children),
118+
{ x: -10, autoAlpha: 0 },
119+
{
120+
x: 0,
121+
autoAlpha: 1,
122+
stagger: 0.1,
123+
duration: 0.7,
124+
ease: 'power2.out',
125+
},
126+
)
127+
})
128+
}
129+
"
113130
class="mx-auto mt-10 flex w-full max-w-md flex-col items-stretch gap-10"
114131
>
115132
@php

0 commit comments

Comments
 (0)