Toggle Sidebar B
AppearanceLight & dark mode D

Comet Dial

Circular dial you turn by dragging around the ring, with a comet trail that stretches behind the bead by how fast it moves and a flick that carries on with momentum.

Default

Tap the ring to jump, or drag around it. Flick to throw the bead and watch the comet stretch.

Dark previewReplay previewOpen in new tab

Customize

Accent
Ink
Value62
Unit
Size250px
Sweep320°
Thickness5
Speed25
Tap Bounce0.2
Flick Bounce0.1
Momentum1
Comet Reach180°
Comet Width12

API Reference

CometDial

PropTypeDefaultDescription
valuenumberundefinedControlled value, bound with v-model:value. A change from outside launches the reading on the tap spring.
defaultValuenumber62Initial value when uncontrolled.
minnumber0Lowest value.
maxnumber100Highest value.
stepnumber1Snapping grid, and the keyboard nudge.
unitstring'%'Suffix after the figure. Empty hides it.
labelstring'Level'Accessible name of the slider.
accentstring'#f5f5f5'The lit arc, the bead and the comet.
inkstring'#fdfdfd'The track and the readout.
sizenumber250Diameter in pixels. Everything inside scales with it.
sweepnumber320Degrees the arc covers, with the gap centred at the bottom.
thicknessnumber5Stroke width of the track and the arc. The bead follows it.
speednumber25How quickly the reading arrives, 0 to 100.
tapBouncenumber0.2Ring-down after a tap. 0 stops dead.
flickBouncenumber0.1Ring-down after a full-speed flick. A slower release lands between the two.
momentumnumber1How far a flick carries the reading past where you let go. 0 drops it where released.
cometReachnumber180Degrees of trail behind the bead at full speed.
cometWidthnumber12Extra stroke width at the head of the trail at full speed.
disabledbooleanfalseDims the dial and ignores input.
EventDescription
changeEmitted on every snapped change, including during a drag.
change-endEmitted on release and on a key, with the value and a detail object holding the release velocity and the bounce it earned.
update:valueEmitted alongside change, for v-model:value.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
Arrow Right + Arrow UpRaises the value by one step. Shift multiplies it by ten.
Arrow Left + Arrow DownLowers the value by one step. Shift multiplies it by ten.
Page Up + Page DownMoves by ten steps.
Home + EndJumps to the minimum or the maximum.
  • The ring is a slider with aria-valuemin, aria-valuemax, aria-valuenow and aria-valuetext including the unit.
  • With prefers-reduced-motion the reading jumps and the comet trail stays off.