coss.com ui

Slider

An input where the user selects a value from within a given range.

API Reference

Installation

Usage

API Reference

Slider

Root component. Styled wrapper for Slider.Root from Base UI with default min/max values and edge-aligned thumbs.

Note: The component sets thumbAlignment="edge" by default, which aligns thumbs to the edge of the track rather than centering them.

SliderValue

Displays the current value. Styled wrapper for Slider.Value from Base UI.

Examples

For accessible labelling and validation, prefer using the Field component with an associated FieldLabel. See the related example: Slider field.

Use getAriaLabel when there is no associated label. Name each range endpoint separately:

Callbacks such as getAriaLabel must be supplied from a Client Component. An associated FieldLabel continues to work without this prop. Setting aria-label on the root alone does not name its thumbs.

With Label and Value

Range Slider

Vertical

Form Integration