Slider

@sushindustries/ui

A native range input with its label - keyboard steps and form value ship in the element.

3 min read
View as MarkdownEdit on GitHub

Slider is a native <input type="range"> with its label attached, painted through accent-color. Reach for it wherever an approximate drag beats a typed number - volume, brightness, a threshold on a chart.

Viewport width
Phone22remthe floor, the narrowest this promises to work at
tanstacktanstack add https://adamjurek.com/r/tanstack/slider.jsonshadcnpnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/slider.json

Why it is built this way

It stays a native range input rather than a rebuilt one because everything a rebuilt slider spends its life re-earning - keyboard steps, page-up and page-down jumps, RTL support, participating in a form's value - ships for free in the browser's own element.

Install

tanstack add https://adamjurek.com/r/tanstack/slider.json
shell
pnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/slider.json
shell
pnpm add @sushindustries/ui @sushindustries/atoms
shell

What you get

Version0.1.0
Categorycontent · Forms
Filesslider.tsx
DependenciesNone
Tagsform, no-deps

No runtime dependencies

It brings nothing with it beyond the stylesheet.