Component packs › Fader › Crossfader

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.

Crossfader props

PropTypeDefaultDescription
valuenumber-0.2-1 = all deck A, 0 = centre, 1 = all deck B. Default -0.2.
curveCrossfaderCurve
decks[string, string]Names shown over each deck's meter.
labelstring
disabledboolean
darkboolean
onChange(value: number, volume: { a: number; b: number }) => voidPosition plus each deck's volume (0–1) through the curve.
onCurveChange(curve: CrossfaderCurve) => void
autoplaynumber | falseShowcase mode: blends or flicks to a new spot every N ms while visible.

Methods on the ref

Use it in React

import Crossfader from './Crossfader';

<Crossfader />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Fader

Good for: Sliders.