ZSwitch
Toggle switch for boolean values
Example
Import
tsx
import { ZSwitch } from "zurto-ui";Usage
tsx
import { ZSwitch } from "zurto-ui";
function Example() {
return (
<>
<ZSwitch label="Notifications enabled" defaultChecked />
<ZSwitch label="Dark mode" />
</>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | - | Switch label |
checked | boolean | false | Checked state |
onChange | (checked) => void | - | Change handler |
Accessibility
- ✅ Keyboard navigation support
- ✅ ARIA attributes included
- ✅ Screen reader friendly
- ✅ Focus management