Switch

A toggle switch for boolean values. Supports labels, per-state icons, and three sizes.


Basic Usage

Bind value to track the switch state.

Value: false

With Label

Pass a string to label for a static label beside the switch.


Dynamic Labels

Pass { on, off } to show different labels per state — both strings are rendered in a stacked grid and cross-faded.


With Icons

Pass icons to render icons inside the thumb. Icons are only shown at normal size.


Sizes

Three sizes: normal (default), compact, and small.


Disabled

The disabled prop makes the switch inert and visually dimmed.