Switch
atomsOn/off toggle with role="switch": a pill track and sliding knob, bindable checked, optional visible label and three sizes.
Notification preferences
each row is a label and description beside a Switch with bind:checked; label names the switch for assistive tech.
Push notifications
Delivered to this device even when the tab is closed.
Daily digest
One email at 08:00 in your timezone.
Only when mentioned
Mute channel chatter, keep direct mentions.
Sounds
Play a chime for new messages.
States
off, on, disabled in both states, invalid, and a Field with an error message; onclick still fires before the toggle.
Micro-interactions
data-fx-switch on <html> or any ancestor picks the effect: squash (default), glow, calm or none.
squash glow calm none Props
| Prop | Type | Default | Description |
|---|---|---|---|
checked bindable | boolean | false | |
invalid | boolean | false | |
label required | string | — | |
labelVisible | boolean | false | Render `label` as visible text beside the track. |
size | ControlSize | 'md' | |
sound | boolean | true | Play UI sounds when enabled globally; false silences this instance. |
id | string | — | |
aria-describedby | string | null | — | |
aria-invalid | HTMLButtonAttributes['aria-invalid'] | — |