# scrollvars fx — llms.txt (copy-paste effects)
> A growing library of scroll/pointer/state effects on the scrollvars engine
> (npm i scrollvars — full core 3.9 KB gzip). Each effect below includes when to
> use it, its knobs, and three ready formats. Engine API: see
> https://scrollvars.dev/llms.txt
## Staggered reveal (staggered-reveal)
Children rise in sequence when the section enters the viewport.
Category: Reveals
Use for: Heroes, editorial sections, any "content arrives" moment.
Knobs: --sv-distance (travel), --sv-stagger (delay step), --sv-duration, --sv-ease
### Tailwind
```html
```
### CSS
```html
/* needs styles/core.css (or paste the preset): */
.sv-on .sv .sv-rise { opacity: 0; translate: 0 var(--sv-distance, 6rem);
transition: opacity .8s var(--sv-ease), translate .8s var(--sv-ease);
transition-delay: calc(var(--sv-order, 0) * var(--sv-stagger, 90ms)); }
.sv-on .sv.sv-live .sv-rise { opacity: 1; translate: 0 0; }
```
### React
```tsx
{/* every direct child, stagger for free */}
Title
Copy
// or per-child knobs as props:
- first
- second
```
## Deck spread (deck-spread)
A centered card deck deals itself into the grid — on arrival or scrubbed.
Category: Reveals
Use for: Feature cards, pricing tiers, portfolio grids that deserve an entrance.
Knobs: --sv-mid = (N−1)/2, --sv-order per card, --sv-gap; map --sv-spread yourself to scrub
### Tailwind
```html
```
### CSS
```html
/* styles/core.css ships it; the math, if you want it inline: */
.sv-spread { display: flex; gap: var(--sv-gap, 16px); justify-content: center; }
.sv-spread > * { --sv-d: calc(var(--sv-order, 0) - var(--sv-mid, 1));
translate: calc(var(--sv-d) * (var(--sv-spread, 0) - 1) * (100% + var(--sv-gap, 16px))) 0;
rotate: calc(var(--sv-d) * (1 - var(--sv-spread, 0)) * -5deg); }
/* scrub instead of play: */
.mine > * { --sv-spread: clamp(0, calc(var(--sv-t) * 2), 1); }
```
### React
```tsx
{/* Item carries the vars as props — no style attr; sv-spread targets
direct children, and the Item wrapper IS the direct child. */}
```
## Curtain (curtain)
Two panels slide apart as you scroll through a pinned stretch.
Category: Pinned scenes
Use for: Chapter breaks, big reveals, section transitions.
Knobs: outer height = scroll length; panel content/colors are yours
### Tailwind
```html
```
### CSS
```html
/* the preset (styles/pin.css): */
.sv .sv-curtain-l { translate: calc(var(--sv-pin, 0) * -101%) 0; }
.sv .sv-curtain-r { translate: calc(var(--sv-pin, 0) * 101%) 0; }
```
### React
```tsx
```
## Horizontal rail (horizontal-rail)
Vertical scroll travels a horizontal track through a pinned stage.
Category: Pinned scenes
Use for: Process steps, timelines, galleries that read left-to-right.
Knobs: outer height = scroll length; works at any viewport width (min() keeps it moving)
### Tailwind
```html
```
### CSS
```html
/* the preset (styles/pin.css): */
.sv .sv-rail { width: max-content;
translate: calc((1 - var(--sv-pin, 0)) * 100vw + var(--sv-pin, 0) * min(100vw - 100%, 0px)) 0; }
```
### React
```tsx
```
## Sequenced scrub (sequenced-scrub)
Each child animates over its own slice of the pin — choreography without a timeline.
Category: Pinned scenes
Use for: Pinned stories where A plays over 0–40%, B over 30–70%, C over 60–100%.
Knobs: --sv-from / --sv-to per child (slice of the clock), --sv-distance; override --sv-clock to pick the clock
### Tailwind
```html
```
### CSS
```html
/* styles/pin.css ships it; the mechanism, if you want it inline: */
.sv .sv-range > * {
--sv-clock: var(--sv-pin, var(--sv-t, 0));
--sv-r: clamp(0, calc((var(--sv-clock) - var(--sv-from, 0)) /
(var(--sv-to, 1) - var(--sv-from, 0))), 1);
}
/* consume --sv-r however you like — ALWAYS with a fallback of 1: */
.mine > * { opacity: var(--sv-r, 1); scale: calc(.8 + var(--sv-r, 1) * .2); }
```
### React
```tsx
// JS twin for canvas/WebGL consumers:
// track(el, { pin: true, onPin: (p) => uniform.set(mapRange(p, 0.3, 0.7)) })
```
## Rotating words (rotating-words)
One word exits up, the next rises from below — a clipped column on one variable.
Category: Text
Use for: Hero headlines: "We build ______".
Knobs: --sv-word (index), --sv-duration; drive it from state, scenes or an interval
### Tailwind
```html
```
### CSS
```html
we build
brandswebsitesproducts
/* the preset (styles/state.css): */
.sv-words { display: inline-flex; flex-direction: column;
vertical-align: bottom; height: 1.15em; overflow: hidden; }
.sv-words > * { display: block; height: 1.15em; line-height: 1.15;
translate: 0 calc(var(--sv-word, 0) * -1.15em);
transition: translate .65s var(--sv-ease, cubic-bezier(.28,.84,.42,1)); }
// drive it (state, scenes, or a timer):
el.style.setProperty('--sv-word', nextIndex)
```
### React
```tsx
const [word, setWord] = useState(0)
we build{' '}
{words.map(w => {w})}
```
## Pointer tilt (pointer-tilt)
Cards tilt toward the cursor with a moving glare — one delegated listener.
Category: Pointer
Use for: Product cards, team grids, anything that should feel physical.
Knobs: tilt degrees and glare live in the preset — override .sv-tilt to taste
### Tailwind
```html
```
### CSS
```html
/* preset in styles/tilt.css — tilt + glare from --mx/--my */
```
### React
```tsx
const ref = usePointer()
```
## Coverflow slider (coverflow-slider)
Native-scroll carousel; slides scale, fade and turn by their distance from center.
Category: Sliders
Use for: Anywhere you were about to install Swiper.
Knobs: --sd per slide (written by slider()); --sv-per-view breakpoints; chrome vars --sv-arrow-*/--sv-dot-*
### Tailwind
```html
{cards.map(c => (
))}
```
### CSS
```html
/* the coverflow is pure CSS on --sd: */
.slide { scale: calc(1 - min(abs(var(--sd, 0)) * 0.12, 0.3));
opacity: calc(1 - abs(var(--sd, 0)) * 0.35);
transform: perspective(900px) rotateY(calc(var(--sd, 0) * -16deg)); }
```
### React
```tsx
{cards.map(c => )}
// chrome: --sv-arrow-* / --sv-dot-* vars, prevIcon/nextIcon, renderDot, or your own UI via ref
```
## Marquee (marquee)
An infinite strip — logos, taglines — that pauses on hover.
Category: Sliders
Use for: Logo walls, ticker bands. The honest replacement for Swiper loop.
Knobs: --sv-marquee-duration (one loop), --sv-gap; --sv-marquee-hover: running disables the pause
### Tailwind
```html
{logos}{/* duplicate once, aria-hidden */}
```
### CSS
```html
…content… …content again (aria-hidden)…
/* the preset (styles/ui.css): */
.sv-marquee { overflow: hidden; display: flex; }
.sv-marquee-track { display: flex; gap: var(--sv-gap, 48px); width: max-content;
padding-right: var(--sv-gap, 48px);
animation: sv-marquee var(--sv-marquee-duration, 30s) linear infinite; }
.sv-marquee:hover .sv-marquee-track { animation-play-state: paused; }
@keyframes sv-marquee { to { translate: -50% 0; } }
```
### React
```tsx
```