Primitives
Select a range of values within a defined range.
Import the Range Slider primitives from ng-primitives/slider.
import {
NgpRangeSlider,
NgpRangeSliderTrack,
NgpRangeSliderRange,
NgpRangeSliderThumb,
} from 'ng-primitives/slider';
Assemble the range slider directives in your template.
<div ngpRangeSlider>
<div ngpRangeSliderTrack>
<div ngpRangeSliderRange></div>
</div>
<div ngpRangeSliderThumb></div>
<div ngpRangeSliderThumb></div>
</div>
Here are some additional examples of how to use the Range Slider primitives.
Display the range slider in a vertical orientation by setting ngpRangeSliderOrientation="vertical".
The following directives are available to import from the ng-primitives/slider package:
The following data attributes are available to style the range slider:
| Attribute | Description | Value |
|---|---|---|
data-disabled |
Applied when the range slider is disabled. | - |
data-orientation |
The orientation of the range slider. | horizontal | vertical |
The following data attributes are available to style the slider track:
| Attribute | Description | Value |
|---|---|---|
data-disabled |
Applied when the range slider is disabled. | - |
data-orientation |
The orientation of the range slider. | horizontal | vertical |
The following data attributes are available to style the slider range:
| Attribute | Description | Value |
|---|---|---|
data-disabled |
Applied when the range slider is disabled. | - |
data-orientation |
The orientation of the range slider. | horizontal | vertical |
The following data attributes are available to style the thumb:
| Attribute | Description | Value |
|---|---|---|
data-orientation |
The orientation of the range slider. | horizontal | vertical |
data-disabled |
Applied when the range slider is disabled. | - |
data-hover |
Applied when the slider thumb is hovered. | - |
data-focus-visible |
Applied when the slider thumb is focused. | - |
data-press |
Applied when the slider thumb is pressed. | - |
data-thumb |
Indicates which value this thumb controls. | low | high |
Adheres to the Multi-Thumb Slider WAI-ARIA design pattern.
Each thumb can be focused and controlled independently:
Copyright © 2026 Angular Primitives
This site is powered by Netlify