Back to components
ComponentsSlider
Standalone slider component with single and range modes, orientation support, and configurable sizing.
Component
Props
| Props | Default | Type |
|---|---|---|
modelValue | 0 | number | [number, number] |
type | SliderType.SINGLE | SliderType |
color | ColorAccent.NEUTRAL | ColorAccent |
size | SliderSize.MD | SliderSize |
step | 1 | number |
min | 0 | number |
max | 100 | number |
multiple | false | boolean |
orientation | Orientation.HORIZONTAL | Orientation |
hasTooltip | false | boolean |
disabled | false | boolean |
borderRadius | — | number |
Usage
modelValue
Sets the slider value.
<template>
<Slider v-model="value" />
</template>
<script setup lang="ts">
const value = ref(35)
</script>
type
Sets slider mode. Use SINGLE for one thumb or RANGE for two thumbs.
<template>
<Slider :type="SliderType.RANGE" v-model="range" />
</template>
<script setup lang="ts">
const range = ref<[number, number]>([20, 80])
</script>
color
Sets slider accent color.
<template>
<Slider :color="ColorAccent.PRIMARY_BRAND" />
</template>
size
Sets track thickness and thumb size variant.
<template>
<Slider :size="SliderSize.LG" />
</template>
step
Sets numeric increment.
<template>
<Slider :step="5" />
</template>
Important
Use a dividable step value that fits within the min-max range to ensure the slider functions correctly.
min
Sets minimum allowed value.
<template>
<Slider :min="10" />
</template>
max
Sets maximum allowed value.
<template>
<Slider :max="250" />
</template>
multiple
Enables range behavior when used with array value.
<template>
<Slider multiple v-model="range" />
</template>
<script setup lang="ts">
const range = ref<[number, number]>([30, 60])
</script>
orientation
Sets horizontal or vertical layout.
<template>
<Slider :orientation="Orientation.VERTICAL" />
</template>
hasTooltip
Shows current value tooltip over thumb(s).
<template>
<Slider hasTooltip />
</template>
disabled
Disables slider interaction.
<template>
<Slider disabled />
</template>
borderRadius
Overrides default rounded classes using a numeric radius in pixels.
<template>
<Slider :borderRadius="8" />
</template>