Slider
The Slider component allows users to select a value or range of values by moving a handle along a track. Supports single values, ranges, vertical layouts, and rich customization hooks for the value-label tooltip.
Examples
(9)Properties
(88)Playground
Basic Usage
Basic slider usage for selecting numeric values within a range.
Ticks and Marks
Slider with visible tick marks and labeled values for better precision.
Range Slider
Range slider for selecting a range of values with two handles on a single track. Perfect for filtering, price ranges, and any scenario where you need to select minimum and maximum values.
Features demonstrated:
•
Basic range selection with two thumbs
•
Custom value formatting and labels
•
Tick marks and step increments
•
Minimum range constraints
•
Real-time range span calculation
Value label customization
valueLabelPosition chooses where the thumb tooltip sits (top / bottom for horizontal, left / right for vertical). valueLabelOffset tunes the gap from the thumb. valueLabelProps accepts any <Text> props — ff, weight, size, color, style — and valueLabelStyle overrides the wrapper Card's style. Set valueLabelAsCard={false} for a flat tooltip with no Card chrome. Both <Slider> and <RangeSlider> accept the same set of props.Decimal steps & precision
The thumb tooltip formats its value from the
step: a fractional step like 0.01 shows two decimals, while an integer step rounds to a whole number (trailing zeros are trimmed, so 0.10 reads as 0.1). Pass precision to force a fixed number of decimals regardless of the step.Slot styling
Each visual layer of the slider is independently customizable:
trackStyle and activeTrackStyle for the track halves, thumbStyle for the handle, tickStyle / activeTickStyle for tick marks, and tickLabelProps for tick labels. Per-tick style overrides on individual ticks[i].style win over the global tick styles. Combined with the value-label slot props (valueLabelStyle, valueLabelProps) you can fully reskin the slider without forking it.Vertical Orientation
Vertical slider orientation for space-efficient layouts and different use cases.
CustomStyles
Showcases how to restyle the Slider using the new color scheme, sizing, and style override props for both single-value and range scenarios.
Scan to open this page on your phonereact-ui-library.com/components/Slider
</>
react-ui-library
100+ accessible, themeable components that work seamlessly across iOS, Android, and Web.
A Platform Blocks product.
Quick Links
Resources