Overview
6 colors · 5 sizes · thumb styles · track styles · marks · range · vertical
Default slider
Use a slider when people benefit from adjusting an approximate value within a bounded range.
Always communicate the range and current value. Use a numeric Input when an exact value matters more than quick adjustment.
Anatomy
- Root container and spacing boundary.
- Primary content and optional secondary metadata.
- State indicators and utility affordances (icons, badges, controls).
- Optional helper text, grouping, and behavioral wrappers.
When to use
- Choose Slider when a repeated, structured interaction is required.
- Use it for clear, consistent operations across similar surfaces.
- Use in forms, lists, and action workflows where clarity matters.
When not to use
- Do not use only for decorative layout without interaction meaning.
- Avoid duplicating the same behavior without distinct user context.
- Prefer simpler HTML or textual content for static, non-interactive labels.
Variants
Component variants should be documented by API props and examples below.
States
Common states include idle, active, disabled, focused, and loading/pending states where applicable.
Behavior
Behavior should remain deterministic and keyboard-friendly, with clear visual feedback for every state transition.
Accessibility
- Use semantic structure and visible labels whenever possible.
- Preserve keyboard navigation and focus visibility.
- Announce status and changes when context requires it.
Content guidelines
- Prefer short, clear labels.
- Keep content actions scannable and outcome-oriented.
- Use consistent wording across similar components.
Examples
Basic
showLabels shows min/max, showTooltip shows the current value above the thumb
Colors
Six color variants for the track and thumb
Thumb styles
default, pill, square, and bubble thumb shapes
Track styles
default, glow, gradient, and spectrum filled track styles
Sizes
Five track heights: xs, sm, md (default), lg, xl
With marks
Auto tick marks every step, or custom marks with labels
With input
showInput adds a number input field that stays in sync with the slider
Range slider
RangeSlider lets the user select a min/max range with two thumbs
Vertical
Set orientation=vertical for column-direction sliders
Volume control
Pair an Icon with a Slider for a compact media control
Slider props
RangeSlider props
Props / API
Api Props
Props