Overview
The Slider component provides an intuitive interface for selecting numeric values within a defined range. It supports both single value selection and range selection with dual handles.Component Selector
Basic Usage
Range Slider
Vertical Orientation
With Step
Properties
The current value(s). Single number for normal mode, array of two numbers
[start, end] for range modeMinimum value of the slider
Maximum value of the slider
Step increment for value changes. Values will snap to multiples of this step
When true, enables range selection mode with two handles for start and end values
Orientation of the slider:
horizontal: Slider bar runs left to rightvertical: Slider bar runs bottom to top
When true, prevents user interaction with the slider
Inline styles for the slider container
CSS class for the slider container
Events
Emitted when the slider value changes during dragging
Emitted when the user finishes dragging the slider handle
Form Integration
The Slider component implements
ControlValueAccessor and works with Angular forms.Reactive Forms
Range with Forms
Keyboard Navigation
When a slider handle has focus:| Key | Action |
|---|---|
Arrow Right / Arrow Up | Increase value by step |
Arrow Left / Arrow Down | Decrease value by step |
Page Up | Increase value by step × 10 |
Page Down | Decrease value by step × 10 |
Home | Set to minimum value |
End | Set to maximum value |
Touch Support
The Slider component fully supports touch interactions:- Touch and drag to adjust values
- Tap on the slider bar to jump to a value
- Multi-touch support for range sliders
Accessibility Features
- ARIA slider role with proper attributes
- Keyboard navigation support
- Focus management
- Screen reader announcements for value changes
- Disabled state handling
Styling
The Slider uses the following CSS classes:.magary-slider: Main container.magary-slider-horizontal: Applied in horizontal orientation.magary-slider-vertical: Applied in vertical orientation.magary-slider-rail: The slider track background.magary-slider-range: The filled range indicator.magary-slider-handle: Draggable handle(s).magary-disabled: Applied when disabled
