Component packs › Fader › Crossfader
Flick the cap and it slides on with its own momentum and knocks off the end stop, while both deck meters play through the curve.
Crossfader is a slider from Fader, a component pack with 8 sliders: Eight sliders, each a real mechanism: a console fader, a radio dial, beads on a wire, a zipline. Price: $2 for the whole pack.
Built with: flick inertia, end-stop rebound, two fader curves.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | -0.2 | -1 = all deck A, 0 = centre, 1 = all deck B. Default -0.2. |
curve | CrossfaderCurve | ||
decks | [string, string] | Names shown over each deck's meter. | |
label | string | ||
disabled | boolean | ||
dark | boolean | ||
onChange | (value: number, volume: { a: number; b: number }) => void | Position plus each deck's volume (0–1) through the curve. | |
onCurveChange | (curve: CrossfaderCurve) => void | ||
autoplay | number | false | Showcase mode: blends or flicks to a new spot every N ms while visible. |
readonly value: numberreadonly curve: CrossfaderCurvesetValue(v: number, silent?: boolean): voidsetCurve(c: CrossfaderCurve): voiddestroy(): voidimport Crossfader from './Crossfader';
<Crossfader />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Sliders.