Component packs › Keycap › Spacebar Slider

Spacebar Slider

Press along the spacebar and drag: it dips under your finger and tilts against its stabiliser wire while the case LEDs fill.

Spacebar Slider is a slider from Keycap, a component pack with 6 keyboard controls: Controls made of mechanical keyboard keys: real travel, a tactile bump and a switch LED under every cap. Price: $2 for the whole pack.

Built with: press point tilt, stabiliser wire, LED level meter.

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.

Spacebar Slider props

PropTypeDefaultDescription
valuenumber640–100. Default 64.
stepnumber5Step for arrow keys. Default 5.
labelstring"Volume"Legend and accessible name. Default "Volume".
disabledboolean
onChange(value: number) => void

Methods on the ref

Use it in React

import SpacebarSlider from './SpacebarSlider';

<SpacebarSlider />

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

More in Keycap

Good for: Buttons.