Toggle Sidebar B
AppearanceLight & dark mode D

Jelly Radio

Radio chips where the chosen chip swells like jelly, shoves its neighbours aside on a spring and the row ripples out from it.

Default

Click a chip and watch it swell while the row makes room. With the arrow keys the change is instant.

Dark previewReplay previewOpen in new tab

Customize

Items
Size
Chip
Active
Text
Active Text
Gap8px
Radius18px
Swell0.2
Barge6px
Shrink0.05
Jelly1
Bounce0.25
Stagger22ms
Stiffness580

API Reference

JellyRadio

PropTypeDefaultDescription
items(string | { value: string; label: string; icon?: string; disabled?: boolean })[]['Off', 'Low', 'Medium', 'High', 'Max']The chips. A string is both value and label. An icon is an Iconify name.
valuestringundefinedControlled value, bound with v-model:value. Outside changes jump.
defaultValuestringundefinedInitial value when uncontrolled. Falls back to the first item.
chipColorstring'#27272a'Surface of an unchosen chip.
activeColorstring'#f5f5f5'Surface of the chosen chip.
textColorstring'#f5f5f5'Label of an unchosen chip, and the hover tone.
activeTextColorstring'#18181b'Label of the chosen chip.
size'sm' | 'md' | 'lg''md'Chip height 28, 36 or 44 pixels. Large is the touch-first size.
gapnumber8Rest spacing between chips in pixels.
radiusnumber18Corner radius in pixels. 18 is a pill at medium.
swellnumber0.2How much the chosen chip grows. It also sets the room the neighbours make.
bargenumber6Extra pixels every neighbour is shoved beyond that room. 0 only makes room.
shrinknumber0.05How much every unchosen chip gives up.
jellynumber1The wide-before-tall split. 0 swells uniformly, 1.5 exaggerates it.
bouncenumber0.25One minus the damping ratio. 0 arrives and stops, 0.4 rings.
staggernumber22Milliseconds per row step before a neighbour moves. 0 moves the row as a slab.
stiffnessnumber580Spring stiffness of the chosen chip. Neighbours soften from it with distance.
disabledbooleanfalseFades the group and ignores input.
ariaLabelstring'Options'Accessible name of the group.
EventDescription
changeEmitted on the commit with the value and the index, before the motion ends.
update:valueEmitted alongside change, for v-model:value.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
Arrow Right + Arrow DownSelects the next enabled chip, wrapping around.
Arrow Left + Arrow UpSelects the previous enabled chip, wrapping around.
Home + EndSelects the first or the last enabled chip.
Space + EnterSelects the focused chip.
  • Rendered as a radiogroup of radio buttons with a roving tabindex. Keyboard and programmatic changes skip the motion.
  • With prefers-reduced-motion every change jumps.