Slider

Range slider input

UI PrimitiveForm Inputs

Overview

Built on Radix UI's Slider primitive. Supports single and range values, an optional floating value tooltip, and tick labels derived from the step setting.

Usage

import { Slider } from "@leanicon/web-builder-library";

Variants

Default

With steps

With step labels

020406080100

With value tooltip

Hover or drag to reveal the value tooltip above the thumb.

30

With persistent value

75

Range (two thumbs)

Range with value tooltips

2080

Custom min/max

2022
2000200520102015202020252030

Disabled

Notes

  • Pass multiple values in the array for a range slider (two thumbs).
  • showLabels generates tick labels from min, max, and step.
  • showValue shows a floating tooltip on hover/focus; persistValue keeps it always visible.
  • Dark mode is handled via semantic tokens.

Props

NameTypeDefaultRequiredDescription
asChildboolean—No
showLabelsbooleanfalseNo
showValuebooleanfalseNo
persistValuebooleanfalseNo