Slider

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

Loading...
import { Component } from '@angular/core';
import { RdxSliderModule } from '@radix-ng/primitives/slider';
@Component({
selector: 'radix-slider-demo',
standalone: true,
imports: [RdxSliderModule],
styleUrl: 'slider-demo.css',
template: `
<rdx-slider [modelValue]="[45]" [step]="5" className="SliderRoot" style="display: flex; width: 200px;">
<rdx-slider-track class="SliderTrack">
<rdx-slider-range class="SliderRange" />
</rdx-slider-track>
<rdx-slider-thumb class="SliderThumb" />
</rdx-slider>
`
})
export class SliderDemoComponent {}

Features

  • Can be controlled or uncontrolled.
  • Supports multiple thumbs.
  • Supports a minimum value between thumbs.
  • Supports touch or click on track to update value.
  • Supports Right to Left direction.
  • Full keyboard navigation.

Anatomy

<rdx-slider>
<rdx-slider-track>
<rdx-slider-range />
</rdx-slider-track>
<rdx-slider-thumb />
</rdx-slider>

API Reference

Root

RdxSliderRootComponent

Track

RdxSliderTrackComponent

Range

RdxSliderRangeComponent

Thumb

RdxSliderThumbComponent

Accessibility

Adheres to the Slider WAI-ARIA design pattern.

Keyboard Interactions