shadcn.io is an independent project built on shadcn/ui
Level and 50 sit above the track. Under it, outline buttons read 0, 25, 50, 75, and 100.
Use it when a few values come up often and the slider covers the rest. A Toggle Group is enough if only those five exist. In Vue, Ark UI does not render the preset buttons.
Installation
Anatomy

Usage
<div class="flex w-full max-w-md flex-col gap-4">
<div class="flex items-center justify-between">
<Label>Level</Label>
<span class="text-muted-foreground text-sm tabular-nums">{{ value[0] }}</span>
</div>
<Slider :aria-label='["Level"]' @value-change="handleValueChange" :value="value" />
<div class="flex gap-2">
<Button
v-for="preset in presets"
class="flex-1"
:key="preset"
@click="handlePresetClick"
size="sm"
:value="String(preset)"
variant="outline"
>
{{ preset }}
</Button>
</div>
</div>FAQ
How do the buttons set the value?
Each button carries its preset as its value, and one shared handler reads it and stores it.
How does the readout follow the thumb?
The value lives in state, starting at 50, and goes back to the slider as value. The number beside the label prints it.
The Vue file binds :value and listens to @value-change, which receives details.value.
How are the buttons laid out?
A flex gap-2 row with flex-1 on each, so the five share the width equally.
API Reference
Label
No extra props in this demo. The rest is on the Label page.
Slider
Sets aria-label="[Level]", value-change="handleValueChange" and value="value". The rest is on the Slider page.
Button
Sets v-for="preset in presets", key="preset", click="handlePresetClick", size="sm", value="String(preset)" and variant="outline". The rest is on the Button page.





