MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / createTimeline

Function createTimeline

src/tailwind/Components/CardNav/CardNav.jsx:58–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 };
57
58 const createTimeline = () => {
59 const navEl = navRef.current;
60 if (!navEl) return null;
61
62 gsap.set(navEl, { height: 60, overflow: 'hidden' });
63 gsap.set(cardsRef.current, { y: 50, opacity: 0 });
64
65 const tl = gsap.timeline({ paused: true });
66
67 tl.to(navEl, {
68 height: calculateHeight,
69 duration: 0.4,
70 ease
71 });
72
73 tl.to(cardsRef.current, { y: 0, opacity: 1, duration: 0.4, ease, stagger: 0.08 }, '-=0.1');
74
75 return tl;
76 };
77
78 useLayoutEffect(() => {
79 const tl = createTimeline();

Callers 2

CardNavFunction · 0.70
handleResizeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected