Rotary dial input control with drag interaction, rendered on canvas.
Open in Storybook β
- For time offset or duration inputs
- For creative/playful numeric inputs
- When a slider doesn't fit the interaction model
npm install @bcc-code/component-library-vue
<script setup>
import { ref } from "vue";
import { BccDialKnob } from "@bcc-code/component-library-vue";
const value = ref(0);
</script>
<template>
<BccDialKnob v-model="value" :min="-720" :max="720" :steps="15" />
</template>
| Prop | Type | Default | Description |
|---|
modelValue | number | β | Current value (v-model) |
size | number | β | Canvas size in pixels |
arcWidth | number | β | Arc stroke thickness |
min | number | β | Minimum value |
max | number | β | Maximum value |
steps | number | β | Step size for snapping |
colored | boolean | β | Use accent colors for the arc |
showHandle | boolean | β | Show drag handle |
hideArrows | boolean | β | Hide left/right arrows |
| Slot | Description |
|---|
default | Center label content |
left | Top-left corner content |
right | Top-right corner content |
| Event | Payload | Description |
|---|
drag:start | β | Fired when drag begins |
drag:update | number | Fired during drag with current value |
drag:end | β | Fired when drag ends |