Toggle Sidebar B
AppearanceLight & dark mode D

Bell Toggle

Pill toggle that answers a press at three tempos: the bell rings on damped keyframes, the label blur-crossfades, and the pill unfurls to the longer label through a clip-path on a critically damped spring. The pressed state is the receipt.

Default

Press the pill. Once it is on, new notifications roll the badge and wobble the bell. A keyboard toggle only crossfades.

Dark previewReplay previewOpen in new tab

Customize

Text
Background
Pressed Text
Pressed Background
Size
Radius22px
Ring Amplitude17°
Ring Passes5
Ring Decay1
Ring Duration820ms
Ring Pivot16%
Crossfade200ms
Reveal Bounce0
Badge Color

API Reference

BellToggle

PropTypeDefaultDescription
offLabelstring'Notify me'The face at rest. Its width sets how far the pill is clipped.
onLabelstring"You'll be notified"The face after the yes press. The pill reserves the width of the longer label; only the visible part changes, so neighbours never shift.
labelstringundefinedConstant accessible name. Falls back to offLabel.
colorstring'#f5f5f5'Ink at rest: label, bell and hover tint.
backgroundstring'#27272a'Pill fill at rest.
onColorstring'#18181b'Ink when pressed.
onBackgroundstring'#f5f5f5'Fill when pressed.
size'sm' | 'md' | 'lg''md'36, 44 or 52 pixels tall with matching type, icon and padding.
radiusnumber22Corner radius of the pill and of the clip cap.
ringAmplitudenumber17Degrees of the first swing. Every later swing scales from it.
ringPassesnumber5Half-swings before rest. 2 is a nod, 9 a peal.
ringDecaynumber1How fast the swings die. 1 evenly, 2 the second is already small, 0.5 keeps shaking.
ringDurationnumber820Milliseconds for the whole ring.
ringPivotnumber16Where the icon hangs from, as a percentage of its height. 16 is the crown, 50 the centre.
crossfadeMsnumber200The label and fill crossfade. Also all a keyboard toggle gets.
revealBouncenumber0Overshoot of the unfurl. 0 is critically damped; 0.2 lets the cap pass its mark and return.
countnumber0Notifications waiting. A rise while on rolls the badge and wobbles the bell.
badgebooleantrueShow the count on the bell while on.
badgeColorstring'#ef4444'The badge.
badgeTextColorstring'#ffffff'The count on the badge.
wavesbooleantrueSound waves leave the rim on every swing.
clapperbooleanfalseDraw a bell with a clapper that swings a beat behind the body.
pressedbooleanundefinedControlled state, usable with v-model:pressed. Outside changes only crossfade.
defaultPressedbooleanfalseInitial state when uncontrolled.
disabledbooleanfalseDims the pill and ignores input. The state is kept.
EventDescription
update:pressedEmitted on every toggle with the new state.
changeSame moment as update:pressed.
SlotDescription
iconReplaces the bell. Adjust ringPivot for a glyph that hangs elsewhere.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
Enter + SpaceToggles the pill. A keyboard toggle crossfades without ringing.
  • A native button with aria-pressed. The visible labels are hidden from screen readers and the accessible name stays constant.
  • With prefers-reduced-motion the pill, bell and badge only crossfade.