The NouisliderComponent is an Angular wrapper for noUiSlider. It can be used as a standalone component and supports both template-driven and reactive forms via ControlValueAccessor.
Basic Configuration
You can configure the slider using various @Input properties that map to noUiSlider options. Common inputs include:
min / max: The range boundaries.step: The step size.range: An object defining the range (e.g., { min: 0, max: 100 }).connect: Boolean or array to connect the handles to the bar.behaviour: String defining slider behavior (e.g., 'mixed', 'range').snap: Boolean to enable snapping to steps.disabled: Boolean to disable the slider.
Event Outputs
The component emits several events based on slider interactions:
change: Emitted when the slider value is changed (usually on release).update: Emitted when the slider value is updated (during sliding).slide: Emitted during sliding.start: Emitted when the user starts interacting with the slider.end: Emitted when the user stops interacting.set: Emitted when the value is set.
Note that emitted values are automatically converted from strings to numbers using the configured formatter.
<nouislider
[min]="0"
[max]="100"
[step]="1"
[(ngModel)]="myValue"
(change)="$event"
(update)="$event">
</nouislider>