Slider

Documentation and examples for the Slider component.

When To Use

Zur Eingabe eines Wertes in einem Bereich.

Example Usage

Range & Tooltips

Enable range to allow selecting a minimum and maximum value, and pass an array to value. Adding tooltip will display the current values when interacting.

Variants & Slots

The Slider supports a tall variant for a thicker track. You can also customize the handler visual using the thumb slot.

How to Use

astro
---
import Slider from '@/components/data-entry/Slider.astro';

---
<Slider id="slider1" min={0} max={100} value={50} />

API

Eigenschaft
Beschreibung
Typ
Standard

label

Beschriftung für den Schieberegler string

variant

Visuelle Stilvariante 'default' | 'tall' 'default'

range

Aktiviert die Bereichsauswahl mit zwei Schiebereglern boolean false

value

Aktueller Wert oder Array mit zwei Werten für den Bereich number | [number, number] 50

min

Mindestwert number 0

max

Höchstwert number 100

step

Granularität des Schiebereglers number 1

tooltip

Zeigt den Wert in einem Tooltip an boolean false

error

Indicates an error state or displays an error message string | boolean

success

Indicates a success state or displays a success message string | boolean

disabled

Disables the component boolean false