Slider
Basic
<script lang="ts">
import { Slider } from 'stwui';
</script>
<Slider value={20} />
<Slider value={40} type="warn" />
<Slider value={60} type="error" />
<Slider value={80} type="success" />
Step and Show Step
0% |25% |50% |75% |100% |
0% |10% |20% |30% |40% |50% |60% |70% |80% |90% |100% |
<script lang="ts">
import { Slider } from 'stwui';
</script>
<Slider value={20} class="mb-4" step={25} showStep />
<Slider value={40} type="warn" step={10} showStep />
Slider Props
value | number | 0 |
min | number | 0 |
max | number | 100 |
step | number | 1 |
showStep | boolean | false |
type | 'info' | 'warn' | 'error' | 'success' | info |