Slider

Lets users choose a numeric value or range by moving a thumb along a track. Use it when an approximate value is easier to select visually.

React

Ready

Figma

React examples

Single value and range

import { Label, Slider, Stack } from "@kela-systems/ui-components";

export default function SliderDefault() {
  return (
    <Stack gap={6} className="w-full max-w-xs">
      <Stack gap={3}>
        <Label id="slider-zoom">Zoom</Label>
        <Slider defaultValue={40} aria-labelledby="slider-zoom" />
      </Stack>
      <Stack gap={3}>
        <Label id="slider-range">Detection range, metres</Label>
        <Slider
          defaultValue={[200, 1500]}
          min={0}
          max={3000}
          step={50}
          aria-labelledby="slider-range"
        />
      </Stack>
    </Stack>
  );
}

Props

Slider

No props of its own. It also takes the props of Base UI's slider.

Read this page as Markdown

Search ARK

Find a page, a primitive or a component.