On this page

Slider

Install, props and the parts Slider is built from.

Install

Run this in the app, after shadcn-vue init and the Beehexa theme (Button › Code):

npx shadcn-vue@latest add https://beehexa.design/r/slider.json

Use

<script setup lang="ts">
import { ref } from 'vue'
import { Slider } from '@/components/ui/slider'
const threshold = ref([20])
</script>

<template>
  <div>
    <Slider v-model="threshold" :min="0" :max="100" :step="5" aria-label="Low-stock threshold" />
  </div>
</template>

Props

Part Prop Values Notes
Slider v-model, min, max, step, disabled number[], number, boolean Two values make a range

Built on

reka-ui SliderRoot, SliderTrack, SliderRange and SliderThumb, as the shadcn-vue Slider.