Skip to content

Slider

An input where the user selects a value from within a given range.

Examples

Default

vue
<script setup>
import { ref } from 'vue'
import { Slider } from '@empathyds/vue'

const value = ref([50])
</script>

<template>
  <Slider
    v-model="value"
    :max="100"
    :step="1"
  />
</template>

Props

Slider

PropTypeDefaultDescription
defaultValuenumber[]-The default value of the slider.
modelValuenumber[]-The controlled value of the slider.
minnumber0The minimum value.
maxnumber100The maximum value.
stepnumber1The step value.
minStepsBetweenThumbsnumber0The minimum steps between thumbs.
disabledbooleanfalseWhether the slider is disabled.
orientationhorizontal | verticalhorizontalThe orientation of the slider.
dirltr | rtl-The reading direction of the slider.
invertedbooleanfalseWhether the slider is inverted.

Slots

Slider

SlotDescription
defaultThe content of the slider.