Slider

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

Default

The standard slider component.

Value: 50

Reactive Forms

Using the slider with Angular Reactive Forms.

Form Value: null

Template-driven Forms

Using the slider with Angular Template-driven Forms.

20°C

Disabled

The slider can be disabled to prevent user interaction.

Disabled Slider (Value: 50)

Range & Steps

Customizing min, max, and step values.

Value: 25

Value: 0

Steps & Ticks

Using custom steps and displaying visual ticks.

Value: 30

Value: 60

Vertical

Slider with vertical orientation.

20
50
80

Colors

Custom styling using Tailwind classes.

Installation & Usage

Installation

Imports

Basic Usage

API Reference

Brain API

The Brain component provides the core accessibility and logic for the slider.

DirectiveSelectorInputs
BrnSliderbrn-slider
  • value: number
  • min: number
  • max: number
  • step: number
  • disabled: boolean
  • showTicks: boolean

Helm API

The Helm component provides the spartan/ui styling for the slider.

DirectiveSelectorInputs
HlmSliderhlm-slider, brn-slider[hlm]
  • orientation: 'horizontal' | 'vertical'