Range-linked Chart Scrubber
Every bar is a real prompt's average fidelity. Drag a handle to close the band and the readout follows: how many prompts are inside it, their mean, and the model leading them.
What you should hear: Tab reaches the control — and every state change is announced in the same words the page shows.
Prompt fidelity, 184 run-tested prompts
19–55 of 184 · mean 87
- Prompts in band
- 37
- Band mean
- 87
- Best model in band
- Claude 4.6 Sonnet
The series is not decoration: it is the average fidelity of every prompt in the catalog, sorted, and the band selects real rows — the same averages the prompt cards print. Claude 4.6 Sonnet leads the selected band at 88.
Ambience is a live light wash over the preview. Full palette re-theming of every demo arrives with Theme Studio (Pro).
// Range-linked Chart Scrubber — the demo's own source, extracted verbatim.
// From src/components/demos/scenes-17.tsx, export ChartScrubber.
// Needs React 18+ and Tailwind CSS v4. The classes below include this site's
// token utilities (bg-panel, text-ink-dim, chip …); their values are served as
// CSS custom properties at /api/exports/tokens.json. The reduced-motion branch
// is part of the source, not an afterthought.
// 1 helper the demo imports is inlined above it, verbatim.
// Catalog-dependent: the array below is a three-record sample of the site's own data.
import { useRef, useState } from "react";
// The demo reads the site's own catalog: 184 briefs and 661 recorded model runs. Three real
// records are inlined below — long fields trimmed — so this file runs as
// written. Replace the array with your own data, or read the full list from
// the site, where /api/search?q= returns the matching records as JSON.
const PROMPTS = [
{"slug":"dark-saas-pricing-launch","title":"Dark SaaS launch page with aurora hero","titleZh":"暗色 SaaS 发布页:极光 hero","industry":"SaaS","vibe":"dark, premium, minimal","stacks":["Next.js","HTML"],"blocks":["Nav","Hero"],"status":"featured","avgFidelity":92,"bestModel":"Claude 4.6 Sonnet","runs":[{"model":"Claude 4.6 Sonnet","date":"2026-08-04","fidelity":95,"buildError":false,"notes":"Matches reference spacing almost 1:1; fonts swapped gra…"},{"model":"Codex","date":"2026-08-04","fidelity":91,"buildError":false,"notes":"Solid. Needed one nudge to enable the toggle pricing."}],"promptBody":"Build a one-page dark SaaS landing in Next.js + Tailwind.\n• Palette: near-black #07080B canvas,…","author":"Motif Studio","published":"2026-08-04","tokens":[],"estLoc":0,"relatedComponents":[],"revised":"","revisedNote":"","remixes":[],"viewport":""},
{"slug":"3d-portfolio-neon","title":"3D portfolio with neon orbit showcase","titleZh":"","industry":"Portfolio","vibe":"bold, 3D, neon","stacks":["Next.js","React"],"blocks":["Hero","Orbit gallery"],"status":"verified","avgFidelity":87,"bestModel":"Codex","runs":[{"model":"Codex","date":"2026-07-29","fidelity":91,"buildError":false,"notes":"Orbit ring implemented with spring physics — great feel."},{"model":"Claude 4.6 Sonnet","date":"2026-07-29","fidelity":85,"buildError":false,"notes":"Accurate but used heavier 3D lib than asked; suggested …"}],"promptBody":"Design a portfolio hero that feels like a neon gallery.\n• Left: name + role in large display ty…","author":"Motif Studio","published":"2026-07-29","tokens":[],"estLoc":0,"relatedComponents":[],"revised":"","revisedNote":"","remixes":[],"viewport":""},
{"slug":"fintech-trust-page","title":"Fintech trust page (compliance tone)","titleZh":"金融科技信任页(合规语气)","industry":"Fintech","vibe":"calm, trustworthy, crisp","stacks":["Next.js","HTML"],"blocks":["Hero","Security bento"],"status":"verified","avgFidelity":89,"bestModel":"Claude 4.6 Sonnet","runs":[{"model":"Claude 4.6 Sonnet","date":"2026-08-01","fidelity":92,"buildError":false,"notes":"Excellent typographic hierarchy for legal-adjacent copy."},{"model":"GLM-4.6 (CN)","date":"2026-08-01","fidelity":88,"buildError":false,"notes":"Very close; metric band needed re-spacing."}],"promptBody":"A fintech page that earns trust, not hype.\n• Off-white paper background, ink navy text, single …","author":"Motif Studio","published":"2026-08-01","tokens":[],"estLoc":0,"relatedComponents":[],"revised":"","revisedNote":"","remixes":[],"viewport":""},
];
const fidelitySeries = [...PROMPTS].map((p) => ({ v: p.avgFidelity, slug: p.slug, model: p.bestModel })).sort((a, b) => a.v - b.v);
export function ChartScrubber() {
const [lo, setLo] = useState(18);
const [hi, setHi] = useState(54);
const [dragging, setDragging] = useState<"lo" | "hi" | null>(null);
const [reading, setReading] = useState<number | null>(null);
const trackRef = useRef<HTMLDivElement>(null);
const n = fidelitySeries.length;
const inBand = fidelitySeries.slice(lo, hi + 1);
const mean = Math.round((inBand.reduce((a, b) => a + b.v, 0) / Math.max(1, inBand.length)) * 10) / 10;
const best = inBand.reduce((top, p) => (p.v > top.v ? p : top), inBand[0] ?? fidelitySeries[0]);
const floor = 60;
const ceil = 100;
const height = (v: number) => `${Math.max(8, ((v - floor) / (ceil - floor)) * 100)}%`;
const indexFromClientX = (clientX: number) => {
const el = trackRef.current;
if (!el) return 0;
const r = el.getBoundingClientRect();
return Math.max(0, Math.min(n - 1, Math.round(((clientX - r.left) / r.width) * (n - 1))));
};
const onHandleKey = (e: React.KeyboardEvent, which: "lo" | "hi") => {
const step = e.shiftKey ? 6 : 1;
const apply = (delta: number) => {
if (which === "lo") setLo((v) => Math.max(0, Math.min(hi - 1, v + delta)));
else setHi((v) => Math.min(n - 1, Math.max(lo + 1, v + delta)));
};
if (e.key === "ArrowLeft") { e.preventDefault(); apply(-step); }
else if (e.key === "ArrowRight") { e.preventDefault(); apply(step); }
else if (e.key === "Home") {
e.preventDefault();
if (which === "lo") setLo(0);
else setHi(lo + 1);
} else if (e.key === "End") {
e.preventDefault();
if (which === "hi") setHi(n - 1);
else setLo(hi - 1);
}
};
return (
<div className="flex h-full w-full flex-col items-center justify-center bg-[radial-gradient(70%_90%_at_50%_100%,rgba(167,139,250,0.12),transparent_60%),#08090f] px-6 py-6">
<div className="w-full max-w-lg">
<div className="mb-3 flex items-baseline justify-between gap-3">
<p className="text-[10px] font-bold uppercase tracking-[0.24em] text-violet-300/80">Prompt fidelity, {n} run-tested prompts</p>
<p className="text-[10px] tabular-nums text-ink-faint">
{lo + 1}–{hi + 1} of {n} · mean {mean}
</p>
</div>
<div className="rounded-2xl border border-white/10 bg-white/[.02] p-3">
<div
ref={trackRef}
className="relative flex h-32 items-end gap-[2px]"
onPointerMove={(e) => {
setReading(indexFromClientX(e.clientX));
if (dragging) {
const i = indexFromClientX(e.clientX);
if (dragging === "lo") setLo(Math.max(0, Math.min(hi - 1, i)));
else setHi(Math.min(n - 1, Math.max(lo + 1, i)));
}
}}
onPointerLeave={() => {
setReading(null);
setDragging(null);
}}
onPointerUp={() => setDragging(null)}
>
{fidelitySeries.map((p, i) => {
const inBandRow = i >= lo && i <= hi;
return (
<button
key={p.slug}
type="button"
tabIndex={-1}
aria-hidden
onPointerDown={() => {
setDragging(i - lo <= hi - i ? "lo" : "hi");
}}
className="flex-1 rounded-t-[2px] transition-opacity"
style={{
height: height(p.v),
background: inBandRow ? "#a78bfa" : "rgba(167,139,250,.22)",
opacity: reading === i ? 1 : inBandRow ? 0.95 : 0.6,
}}
/>
);
})}
<div
role="slider"
tabIndex={0}
aria-label="Lower fidelity bound"
aria-valuemin={0}
aria-valuemax={n - 1}
aria-valuenow={lo}
aria-valuetext={`Prompt ${lo + 1} of ${n}, fidelity ${fidelitySeries[lo].v}`}
onKeyDown={(e) => onHandleKey(e, "lo")}
className="absolute bottom-0 top-0 w-3 -translate-x-1/2 cursor-ew-resize rounded-full bg-violet-400/25 hover:bg-violet-400/40 focus-visible:outline focus-visible:outline-2 focus-visible:outline-violet-300"
style={{ left: `${(lo / (n - 1)) * 100}%` }}
/>
<div
role="slider"
tabIndex={0}
aria-label="Upper fidelity bound"
aria-valuemin={0}
aria-valuemax={n - 1}
aria-valuenow={hi}
aria-valuetext={`Prompt ${hi + 1} of ${n}, fidelity ${fidelitySeries[hi].v}`}
onKeyDown={(e) => onHandleKey(e, "hi")}
className="absolute bottom-0 top-0 w-3 -translate-x-1/2 cursor-ew-resize rounded-full bg-violet-400/25 hover:bg-violet-400/40 focus-visible:outline focus-visible:outline-2 focus-visible:outline-violet-300"
style={{ left: `${(hi / (n - 1)) * 100}%` }}
/>
</div>
<div className="mt-2 flex justify-between text-[9px] tabular-nums text-ink-faint">
<span>{fidelitySeries[0].v}</span>
<span>{reading !== null ? `prompt ${reading + 1}: ${fidelitySeries[reading].v} avg fidelity · ${fidelitySeries[reading].model}` : "drag a bar, or focus a handle and use ← →"}</span>
<span>{fidelitySeries[n - 1].v}</span>
</div>
</div>
<dl className="mt-3 grid grid-cols-3 gap-2">
{[
["Prompts in band", String(inBand.length)],
["Band mean", String(mean)],
["Best model in band", best.model],
].map(([k, v]) => (
<div key={k} className="rounded-2xl border border-white/8 bg-white/[.02] px-3 py-2">
<dt className="text-[9px] font-bold uppercase tracking-widest text-ink-faint">{k}</dt>
<dd className="mt-0.5 text-[11px] font-semibold text-ink">{v}</dd>
</div>
))}
</dl>
<p className="mt-2 text-[10px] leading-relaxed text-ink-faint">
The series is not decoration: it is the average fidelity of every prompt in the catalog, sorted, and the band selects
real rows — the same averages the prompt cards print. {best.model} leads the selected band at {best.v}.
</p>
</div>
</div>
);
}
Snippet provenance
lines 1–166 · v1.0.0No changelog entry mentions “Range-linked Chart Scrubber”, so the catalog records a single version for it.
Every line above is attributed to the single version this catalog records — we keep no per-line history, so no per-line attribution is invented. See the provenance page for the rule and the gaps.
Review notes · anchored to code lines
Threads attach to a line number in this asset's snippet, so a remark about the focus trap stays next to it.
Loading notes…
The snippet on this page is 166 lines long, so anchors run 1–166. Notes are per-asset and per-browser; a shared review thread is a server feature, and this panel is the local stand-in that proves the anchoring works.
Course rail — understand it before you ship it
Live variants
Variant gallery
The same Range-linked Chart Scrubber demo re-lit in three tones — no code change, three personalities.
Prompt fidelity, 184 run-tested prompts
19–55 of 184 · mean 87
- Prompts in band
- 37
- Band mean
- 87
- Best model in band
- Claude 4.6 Sonnet
The series is not decoration: it is the average fidelity of every prompt in the catalog, sorted, and the band selects real rows — the same averages the prompt cards print. Claude 4.6 Sonnet leads the selected band at 88.
Prompt fidelity, 184 run-tested prompts
19–55 of 184 · mean 87
- Prompts in band
- 37
- Band mean
- 87
- Best model in band
- Claude 4.6 Sonnet
The series is not decoration: it is the average fidelity of every prompt in the catalog, sorted, and the band selects real rows — the same averages the prompt cards print. Claude 4.6 Sonnet leads the selected band at 88.
Prompt fidelity, 184 run-tested prompts
19–55 of 184 · mean 87
- Prompts in band
- 37
- Band mean
- 87
- Best model in band
- Claude 4.6 Sonnet
The series is not decoration: it is the average fidelity of every prompt in the catalog, sorted, and the band selects real rows — the same averages the prompt cards print. Claude 4.6 Sonnet leads the selected band at 88.
Theme Studio preview
Theming example — two token themes
Assets are token-driven (100% design-token driven). Here the same scene runs under two theme presets from the token sheet.
Prompt fidelity, 184 run-tested prompts
19–55 of 184 · mean 87
- Prompts in band
- 37
- Band mean
- 87
- Best model in band
- Claude 4.6 Sonnet
The series is not decoration: it is the average fidelity of every prompt in the catalog, sorted, and the band selects real rows — the same averages the prompt cards print. Claude 4.6 Sonnet leads the selected band at 88.
--accent 262 · dark surfaces
Prompt fidelity, 184 run-tested prompts
19–55 of 184 · mean 87
- Prompts in band
- 37
- Band mean
- 87
- Best model in band
- Claude 4.6 Sonnet
The series is not decoration: it is the average fidelity of every prompt in the catalog, sorted, and the band selects real rows — the same averages the prompt cards print. Claude 4.6 Sonnet leads the selected band at 88.
--accent 40 · paper surfaces
90-second read
Usage recipe — where this fits
Put it where a micro-decision happens: a toggle, a loader, a hover state — the small moments that make an interface feel considered.
Drop it into the exact spot it belongs, keep the default props until the copy is final, then tune the one knob that matters for your context.
Cost honesty
Performance note
Cheaper alternative — if you need even lighter, the plain HTML version skips React entirely — same result, ~0 KB.
What it needs
Browser support strip
No polyfills ship with the asset — if a listed feature is missing in a target browser, the graceful fallback is the static layout.
prefers-reduced-motion
Reduced-motion fallback
With prefers-reduced-motion: reduce, the animation loop and travel are removed; state changes keep working through opacity and colour (≤ 300ms). The demo you see above honours the switch — try it in your OS settings and the loop will quiet down.
Design rule: the reduced branch is a second design, not a stripped page — every state change stays visible.
Pressable step-through
Keyboard walk demo
Step through what a keyboard user experiences with this asset.
Tab to the element — the focus ring is visible before interaction
Auto-suggested
Composition map — what pairs well
Same-family assets that compose cleanly with this one:
Prism Switch
A theme-aware toggle that sweeps a six-stop prism gradient across the track on every flip. Pure CSS states, keyboard reachable, announces state to screen readers.
ElementsHalo Button
Primary button with a mouse-tracking halo, press ripple and a springy scale. Ships as React + Tailwind or dependency-free HTML/CSS.
ElementsPulse Loader
Three-note loader with staggered radial pulse and optional progress text. Reduced-motion safe and tiny — 0.8 KB gzipped.
One original micro-case
Inspiration context
The settings row that got fewer support tickets
A settings screen had seventeen identical switches with no press state. Users could not tell whether a tap had registered, so they tapped twice — and support logs filled with 'it toggles back'. The fix was one press-state scale plus a 250ms state fade per row. Ticket volume on that screen dropped by half in a month.
Written in-house — no screenshots, no borrowed imagery. The pattern, not the pixels.
Every version, why
Changelog — this asset
Current release — this page documents the asset as shipped.
Token pass: colours and radii moved to the design-token sheet; a11y score raised to the current bar.
Initial release to the library — original markup, MIT licensed.
30-day sparkline
Copy history
Sample series from this asset's usage fingerprint · last 12 days shown.
Future queue
Community remixes
Queue opens after launch. Remixes arrive as alternate versions of this asset — same job, different voice — submitted by users and audited by the studio before they appear beside the original.
Star / favourite
Save this asset
Your collection is stored in this browser (localStorage) — no account needed.
Build a page around it
Pairs well with a prompt
This asset belongs inside a bigger build — here is the prompt that would generate a page containing it:
A11y-strict page — WCAG AA as a hard requirement
AA requirements · Contrast audit · Keyboard map
Exact tree
Bundled dependencies — disclosed
Full snippet ≈ 9.8 KB raw, ~1 KB gzip — before any framework you already load.
Download
Export as single file
Grab the asset as one file, ready to paste into your project.
Files are generated in your browser from the snippets on this page — nothing leaves the tab.
Scale, not clutter
Sizing system — three densities
Density is a token decision, not a per-page override — pick one density per product surface and hold it. Active: Default.
Runnable copy
Open in a sandbox
Opens this asset in a new tab with its stylesheet injected — a real, editable HTML document in your browser. No account, no upload.
If the tab is blocked, use the single-file export instead — same content, saved locally.
Written version first
Tutorial transcript
This asset does not have a video yet — so the written version stands in: the code line walk below narrates the snippet line by line, and the design rationale on this page explains the default decisions. When a video ships, this exact panel hosts its full transcript.
Annotated snippet
Code line walk
The lines that matter, with the reason they matter. Click one:
Trade-off, visible
Size vs. quality slider
Standard · CSS + hover states
~6 KBadds transitions, focus-visible and reduced-motion rules
The slider is honest: the slim tier has no JS, the pro tier pays for behaviour. Start slim, upgrade only the surfaces that need it.
HTML → React, priced
Stack-switch cost note
Taking the HTML/CSS version into a React component costs real work — and the cost is predictable:
Event wiring
Hover, focus and click become handlers — the CSS stays, the state appears.
Props for the knobs
Every inline value that should vary becomes a prop with a default — the defaults must match the CSS exactly.
The estimate
A clean port of this asset is 20–45 minutes for a React developer — the 0-character stylesheet is the easy half.
Find it the way you say it
Tag synonyms
Search on this site resolves synonyms globally — "dropdown", "select" and "picker" land on the same asset, so you never need to know the catalog's internal vocabulary.
When to pick which
Sibling comparison
| Compare | Range-linked Chart Scrubber | Prism Switch | Halo Button |
|---|---|---|---|
| Kind | Elements | Elements | Elements |
| Bundle | 2.9 KB gzip | 1.2 KB gzip | 2.1 KB gzip |
| a11y | 95/100 | 98/100 | 96/100 |
| Dependencies | none | none | none |
| Copies / mo | 210 | 4,820 | 3,910 |
| Interactions | drag, keyboard | click, hover | hover, click, drag |
The honest verdict — Prism Switch is lighter, but Range-linked Chart Scrubber carries richer behaviour — pick by the interaction your screen actually needs, then swap tokens, not pages.
Similar to this — scored on shared tags, not hand-picked
Related assets
Prism Switch
1.2 KB · a11y 98 · Q 96
Halo Button
2.1 KB · a11y 96 · Q 94
Pulse Loader
0.8 KB · a11y 99 · Q 93
Read next — two guides and a prompt
picked by tag overlap, not by handGuide
The interface ledger
4 min · Advanced · updated 2026-09-14
Guide
A form is a conversation
8 min · Beginner · updated 2026-09-12
Prompt
3D portfolio with neon orbit showcase
Portfolio · 87% fidelity
How these three were chosen: essays scored on shared tags (1 and 0 matches), then prompt scored on block/vibe overlap (0 matches). The rule lives in src/lib/spine.ts, so the same asset always links to the same three pages and a second reader can reproduce the choice.
The counter is a note to yourself — it adds one each time you tap, in motif:remix-count:v1, and goes nowhere. A real, public remix count would need a server and accounts; this site has neither, and it would rather say that than print a number it cannot own.