Forms
ISwitch
A toggle for a setting that takes effect immediately. Where the change is saved with the rest of a form, use ICheckbox.
With a description
description sits under the label and is wired to the switch, so it is announced as part of the control.
A Monday summary of everything sent, paid and overdue.
Sizes
The track, thumb and travel scale together.
Disabled
Without a label
Leave label off and the switch renders alone. Give it an aria-label, or point a separate ILabel at it with id.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Text beside the switch, wired to it |
description | string | — | Secondary line under the label |
size | 'sm' | 'md' | 'lg' | 'md' | Control scale |
id | string | generated | Useful when an external ILabel targets it |
unstyled | boolean | — | Drop built-in classes |
class | string | — | Merged with the built-in classes |
ui | { wrapper?, root?, thumb?, content?, label?, description? } | — | Per-slot class overrides |
disabled, required, name and value are forwarded to Reka UI's SwitchRoot, so the switch posts in a plain <form>.
Inside an IFormField the label, description and error come from the field — set them there rather than here.