Skip to content

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

PropTypeDefaultDescription
labelstring-Switch label
checkedbooleanfalseChecked state
onChange(checked) => void-Change handler

Accessibility

  • ✅ Keyboard navigation support
  • ✅ ARIA attributes included
  • ✅ Screen reader friendly
  • ✅ Focus management

Released under the MIT License.