Slider

Documentation and examples for the Slider component.

When To Use

범위 내의 값을 입력할 때 사용합니다.

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

속성
설명
타입
기본값

label

슬라이더에 대한 레이블 string

variant

시각적 스타일 변형 'default' | 'tall' 'default'

range

이중 썸 범위 선택을 활성화합니다 boolean false

value

현재 값 또는 범위를 위한 두 값의 배열 number | [number, number] 50

min

최소값 number 0

max

최대값 number 100

step

슬라이더의 정밀도 number 1

tooltip

툴팁에 값을 표시합니다 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