Toggle Sidebar B
AppearanceLight & dark mode D

Scrub Field

Number field you scrub by dragging the chip, with a rubber band past its bounds, a ghost delta riding the pointer, modifier keys for coarse and fine steps, and click to type.

Default

Drag the chip sideways to scrub the number. Hold Shift for coarse steps and Alt for fine ones. Click without moving to type a value.

Dark previewReplay previewOpen in new tab

Customize

Accent
Chip
Default24
Min0
Max100
Step
Size
Sensitivity2px
Rubber Reach8%
Return300ms
Coarse10x
Fine0.1x

API Reference

ScrubField

PropTypeDefaultDescription
labelstring'Radius'The field name. Drag anywhere on the chip to scrub, click without moving to type.
suffixstring'px'Unit after the number, also read by screen readers.
valuenumberundefinedControlled value, bound with v-model:value. Changes from outside land without motion.
defaultValuenumber24Initial value and the dirty baseline. The ring turns off exactly here.
minnumber0Lower bound. The rubber band starts here.
maxnumber100Upper bound. The rubber band starts here.
stepnumber1Granularity of drag and arrows. Sets the decimals shown.
size'sm' | 'md' | 'lg''md'Chip height 28, 34 or 44 pixels.
sensitivitynumber2Pixels of travel per step. 1 is twitchy, 6 is precise.
rubberReachnumber8How far past a bound the number can be pushed, as a percent of the range. 0 is a hard stop.
returnDurationnumber300Duration in milliseconds of the critically damped snap back to the bound.
coarseMultipliernumber10Step multiplier while Shift is held, and for Page Up and Page Down.
fineMultipliernumber0.1Step multiplier while Alt or Option is held. Adds a decimal.
showDeltabooleantrueShows the signed change in a pill riding the pointer.
showDirtybooleanfalseRings the chip while the value differs from the default.
showFillbooleantrueFills the chip from the left in proportion to where the value sits in the range.
accentstring'#f5f5f5'Fill band, dirty ring and delta pill.
chipColorstring'#27272a'Chip surface. Text inherits from the page.
disabledbooleanfalseDims the chip and ignores input.
EventDescription
changeEmitted on every step, key and typed commit.
commitEmitted on release, on a key step and on blur or Enter.
update:valueEmitted alongside change, for v-model:value.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
Arrow Up + Arrow DownSteps the value. Shift multiplies the step, Alt divides it.
Page Up + Page DownSteps by the coarse multiplier.
Home + EndJumps to the minimum or the maximum.
EnterCommits the typed value.
EscapeCancels typing, or cancels a drag and restores the value from before it.
  • The field is a spinbutton with aria-valuenow, aria-valuemin, aria-valuemax and aria-valuetext including the suffix. The label is linked to the input.
  • With prefers-reduced-motion the chip no longer leans and the number snaps back without a spring.