Six Values Scroll
A pinned section that plays one specimen card through each of the six values in turn, with a lit ledger saying what each one changes.
DOM + CSS0 deps1 file · 41 KB TSXreduced-motion aware
Props
"use client";
import { useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
import type { CSSProperties, RefObject } from "react";
/**
* SixValuesScroll — the six values played one at a time across a single specimen.
*
* Pinned for a long run, the section splits the scroll into six beats. In
* each, one value sweeps the specimen card (from the reader's own value
* down to 0, up to 1, and back) while the others hold: contrast re-solves
* the ink, warmth leans every neutral, light crosses from night to paper,
* density rescales type and spacing, motion quickens the card's sync dots
* or stills them, focus dims everything but the task. The specimen's
* tokens are computed per frame and written as CSS variables, so nothing
* re-renders React while it plays. A ledger of the six values lights the
* active one with its live number and what it changes; on a phone the
* ledger becomes a rail under the card.
// ---------------------------------------------------------------
// Full source available with a viberdy Pro subscription.
// https://viberdy.dev/pricing
// ---------------------------------------------------------------
}Details
About this section
Feature sections usually list what a product does. This one shows it, one value at a time. The section pins and splits its scroll into six beats. In each, a single value sweeps the same specimen card, from the reader's own setting down to nothing, up to full and back, while the others hold. Contrast firms the ink and edges, warmth leans every neutral, light crosses from a night studio to paper, density rescales the type and spacing, motion quickens the card's little sync dots or stills them, and focus dims everything but the task in hand. Beside it, a ledger of the six values lights the one playing, with its live number and a line on what it changes. On a phone the ledger becomes a rail under the card.
Curator’s note
Pro: the specimen's tokens are computed per frame from a sweeping tuning and written as CSS variables, so the whole card re-forms at 60 fps without a React render; the ledger is lit by data attributes and CSS. Every Ultra entry reads the same six values (contrast, warmth, light, density, motion, focus) from one shared store, so a change made in any of them re-forms all of them.

