Skip to content
Eskais UI

Forms

Slider

UI SDK Slider: one value or a range, with a formatted value part, named by Field.

Example

$20 – $80

Installation

npx shadcn@latest add @eskais/slider
Brings alongfield

Usage

Import
import {  createSliderController,  Slider,  SliderControl,  SliderIndicator,  SliderThumb,  SliderTrack,  SliderValue,} from "@/components/ui/slider"

API reference

Other exports

createSliderControllertype SliderControllertype SliderStatetype SliderValueChangeDetails

Accessibility

  • Arrow keys, Page Up/Down and Home/End; each thumb in a range needs its own label.
  • SliderValue is formatted.

Agent actions

Agents set numbers, or text that starts with one, like "30".

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.