Skip to main content

Range Slider

New

Dual-handle slider for selecting value ranges like price, age, or percentages. Built on top of the Slider component with enhanced UX for range selection.

Preview

$0$1000

Installation

Terminalbash

Basic Usage

Reacttsx

Examples

Price Range

$100$500
$0$1000
tsx

Age Range

18100
tsx

Percentage Range

20%80%
tsx

Props

NameTypeDefaultDescription
min
number0Minimum value of the range
max
number100Maximum value of the range
step
number1Step increment for the slider
value
[number, number]undefinedControlled range value [min, max]
defaultValue
[number, number][min, max]Default range value [min, max]
onValueChange
(value: [number, number]) => voidundefinedCallback when range value changes
formatLabel
(value: number) => string(val) => val.toString()Function to format value labels (e.g., for currency)
showLabels
booleanfalseShow current values above the slider thumbs
showMinMax
booleanfalseShow min/max labels below the slider
disabled
booleanfalseDisable the slider
dir
'ltr' | 'rtl'auto-detectForce text direction (auto-detects from context)

Features

RTL Support

Automatically adapts to RTL layouts with proper thumb positioning and value display.

Custom Formatting

Format values as currency, percentages, or any custom format using the formatLabel prop.

Flexible Labels

Show current values above thumbs and min/max labels below the slider for better UX.

Accessible

Built on Radix UI primitives with full keyboard navigation and screen reader support.