Skip to content
← Inventory

Slider

Selects a single value or a range from a continuous scale, rendering one draggable thumb per value. Import from "@desk/ui/components/slider". Built on Radix UI primitives for accessible behavior.

Usage

import { Slider } from "@desk/ui/components/slider";

Best practices

  • Pass value/defaultValue as an array — one number per thumb; a two-element array renders a range and the thumb count follows the array length.

  • Set min/max/step to real domain bounds (defaults 0–100) rather than rescaling values yourself after onValueChange.

  • For exact numeric entry use Input type="number"; reserve Slider for approximate selection along a continuous range.

Props

Also exports

  • componentSlider