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

Function createTimeline

src/ts-default/Components/CardNav/CardNav.tsx:84–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82 };
83
84 const createTimeline = () => {
85 const navEl = navRef.current;
86 if (!navEl) return null;
87
88 gsap.set(navEl, { height: 60, overflow: 'hidden' });
89 gsap.set(cardsRef.current, { y: 50, opacity: 0 });
90
91 const tl = gsap.timeline({ paused: true });
92
93 tl.to(navEl, {
94 height: calculateHeight,
95 duration: 0.4,
96 ease
97 });
98
99 tl.to(cardsRef.current, { y: 0, opacity: 1, duration: 0.4, ease, stagger: 0.08 }, '-=0.1');
100
101 return tl;
102 };
103
104 useLayoutEffect(() => {
105 const tl = createTimeline();

Callers 2

CardNavFunction · 0.70
handleResizeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected