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

現在の値、または範囲用の2つの値の配列 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