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

Function createTimeline

src/content/Components/CardNav/CardNav.jsx:59–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 2

CardNavFunction · 0.70
handleResizeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected