Slider
An input where the user selects a value from within a given range.
Component Features
- 🎚️ Single & Range: Supports single value and range (dual thumb) selection.
- 📏 Multiple Sizes: Supports
sm,md,lgsize specs. - 🏷️ Tick Marks: Supports displaying tick marks with
show-markprop. - 💬 Tooltip: Supports tooltip display during drag via
show-tooltipprop. - ⌨️ Keyboard Support: Full keyboard navigation with arrow keys.
- 🔢 Step Control: Supports
stepprop to control value increments. - ❌ Disabled State: Supports
disabledprop. - ⚠️ Error State: Supports
errorprop to display error state. - 🎨 Theme Customization: Based on
BrConfigProviderfor global theming and TailwindCSS local overrides.
Basic Usage
Range
If the bound value is an array, it automatically renders as a dual-thumb range slider.
Marks & Steps
You can set step values and use the marks prop to display custom marks. Use showTooltip to display the current value on hover/drag.
Sizes
Use the size prop to control the size of the slider. Supported sizes are xs, sm, md (default), lg, xl, 2xl.
States
Use the disabled prop to disable the slider, or the isError prop to show a validation error state.
Theming
Global Customization (BrConfigProvider)
You can easily override the default slider appearance (colors, background) using the BrConfigProvider.
Local Customization (TailwindCSS)
You can pass Tailwind classes directly to target specific parts of the slider.