FabricStripTimeline converts vertical scroll progress into horizontal movement so that work history entries glide sideways across a fabric-strip background as the user scrolls down the page. The mechanic is purely CSS and Framer Motion — no JavaScript scroll listeners, no manual calculations — which keeps it smooth even on lower-end devices.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/artisan-developer/llms.txt
Use this file to discover all available pages before exploring further.
Demo data
The component ships with four default timeline entries that represent a fictional but complete work history:{ year, role, company, desc }. Replace the demo data with real work history by editing this array directly in components/FabricStripTimeline.js.
Scroll mechanics
The section is taller than the screen so the browser has room to scroll while the content appears stationary:| Element | Key style |
|---|---|
Outer <section> | h-[300vh] — creates 3× viewport height of scrollable space |
| Inner wrapper | position: sticky; top: 0; height: 100vh — pins content to the top while the page scrolls |
Strip motion.div | x motion value drives horizontal translation |
useScroll hook is attached to the outer section via a ref. It tracks scrollYProgress from 0 (section enters viewport) to 1 (section exits viewport). This progress value is piped through useTransform to map [0, 1] → ['0%', '-75%'], which becomes the x style on the strip container. As the user scrolls down, the strip moves left.
At the bottom of the sticky wrapper a “Scroll to unravel” hint with a bouncing downward arrow is shown to signal to visitors that scrolling down advances the timeline.
Entry card layout
Each timeline entry renders as a flex column with three sub-elements:- Timeline node — a 64×64 px circle (
w-16 h-16) with a cream background,border-4 border-teal-400, and a smaller spinning tie-dye circle inside (animate-spin-slow). - Connector line — a 1 px tall
bg-teal-200bar anchored atleft-fullwithw-[60vw]width, connecting each node to the next. The line is omitted on the last entry. - Content card — a
bg-cream/95 backdrop-blur-smrounded card containing the year (.font-hand, magenta), role (.font-display,text-3xl), company (text-teal-600), and description (text-teal-800). The card lifts-translate-y-2on hover.
w-[60vw] on mobile and w-[40vw] on md: breakpoints and above, ensuring entries fill the screen width on small devices while showing more whitespace on large displays.
Customizing entries
To update the timeline with real work history, edit thetimeline data array in components/FabricStripTimeline.js. Add or remove objects following the { year, role, company, desc } shape:
useTransform output range (currently '-75%') to ensure the last entry scrolls fully into view. A rough guide: for n entries, set the end value to approximately -(n - 1) * 100 / n percent.