Component packs › Keycap › 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.
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | 64 | 0–100. Default 64. |
step | number | 5 | Step for arrow keys. Default 5. |
label | string | "Volume" | Legend and accessible name. Default "Volume". |
disabled | boolean | ||
onChange | (value: number) => void |
readonly value: numbersetValue(value: number, silent?: boolean): voiddestroy(): voidimport SpacebarSlider from './SpacebarSlider';
<SpacebarSlider />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Buttons.