Forms · Switch
SSR NativeAccessibleSwitch
Changes a setting immediately with a labelled binary control.
Astro
---
import { Switch } from '@charvesta/cetha';
---
<Switch id="alerts" name="alerts" label="Critical alerts" checked />API reference
| Prop | Type | Default | Description |
|---|---|---|---|
id* | string | — | Connects the control and label. |
label* | string | — | Visible setting name. |
description | string | — | Optional consequence or scope. |
class | string | — | Additional classes forwarded to the rendered element. |
Accessibility
Use a switch for immediate settings, not choices that require form submission.