Slider
A value set by dragging a thumb between a minimum and maximum.
Code
<script lang="ts">
import { Slider } from '@geoffcox/sterling-svelte';
let value = $state(0);
</script>
<Slider bind:value />
Members
| Property Name | Type | Default | Comment |
---|
| disabled | boolean | null | undefined | false |
| max | number | undefined | 100 |
| min | number | undefined | 0 |
| step | number | undefined | 1 |
| onChange | (value: number) => void | undefined |
| precision | number | undefined | undefined |
| value | number | undefined | 0 |
| vertical | boolean | null | undefined | false |
Considerations
- Includes HTMLDivElement props, events, and methods.
Anatomy
slider (<div>)
container (<div>)
track (<div>)
fill (<div>)
thumb (<div>)