<div class="space-y-4">
<div class="flex items-center gap-3">
<ui-switch id="airplane-mode"></ui-switch>
<ui-label for="airplane-mode">Airplane Mode</ui-label>
</div>
<div class="flex items-center gap-3">
<ui-switch defaultChecked></ui-switch>
<ui-label>Notifications (on)</ui-label>
</div>
<div class="flex items-center gap-3">
<ui-switch disabled></ui-switch>
<ui-label>Disabled</ui-label>
</div>
</div>
<ui-switch>
<ui-switch>| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | — | Controlled checked state. |
defaultChecked | boolean | false | Default checked state. |
disabled | boolean | false | Whether disabled. |
All components also accept standard HTML attributes (class, id, style, data-*, aria-*, etc.) which are passed through to the underlying element.