Switch
A control that allows the user to toggle between on and off.
Examples
import { Switch } from 'kalki-design'
<Switch></Switch>Installation
npx kalki-design add switchUsage
import { Switch } from 'kalki-design'
export default function Example() {
return <Switch />
}API Reference
| Name | Type | Default | Description |
|---|---|---|---|
Namelabel | Typestring | Default— | DescriptionLabel rendered next to the switch. |
NamehelperText | Typestring | Default— | DescriptionSupplementary text below the label. |
Nameerror | Typestring | boolean | Default— | DescriptionError state message or styling. |
Namedisabled | Typeboolean | Defaultfalse | DescriptionPrevents interaction. |
Namechecked | Typeboolean | Default— | DescriptionControlled checked state of the switch. |