Primitives

Slider

Smooth: the thumb follows the pointer and settles on the step; clicks and keys glide. default, gradient, fat, stepped, glow, minimal; ranges, marks, vertical.

default · drag it: the thumb follows the pointer, the value snaps

gradient · a range

fat · the value inside the fill

65% full

stepped · a dot for every step

glow · for dark panels

minimal · a hairline; the dot grows when touched

marks with labels · showValue="always"

Import#

Everything comes from the package root. The example above uses:

your-component.tsx
import { Slider } from "@waveinno/ui";

Props#

Read from the source of this version, so they match the code exactly.

<Slider>

src/components/ui/slider.tsx
PropTypeDefaultDescription
variant"default" | "gradient" | "fat" | "glow" | "stepped" | "minimal""default"
marks{ value: number; label?: React.ReactNode }[]—Ticks under the track.
showValue"active" | "always" | "never""active"The value over the thumb: while used (default), always, or never.
format(value: number) => string(v) => v.toLocaleString()
smoothbooleantrueFollow the pointer between steps while dragging (default), or move in steps.
iconReact.ReactNode—`fat` only: an icon at the start of the fill.

Also takes Omit<React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>, "children">.

Install#

If the project does not have the package yet, add it, then follow the setup for Next.js or Vite once.

$ npm install @waveinno/ui