Component
Checkbox
Multi-select or confirmation control.
Immediate on/off setting.
Immediate on/off. Pill track, role=switch. Not a Checkbox.
Toggle the medium switch on the canvas. Variants shows sizes and disabled.
Instant settings only. Checkbox for multi-select or agree-to-terms. RadioGroup for one of several. Unlabeled needs ariaLabel.
Immediate on/off setting. Pill track, role=switch. Not a Checkbox.
import { Switch } from "agentic-ds-kit";From contracts/switch.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| id | string | No | — | useId fallback |
| label | string | No | — | visible text; required unless ariaLabel is set |
| ariaLabel | string | No | — | required when label is omitted |
| size | sm | md | lg | No | md | — |
| disabled | boolean | No | false | — |
| checked | boolean | No | — | controlled |
| defaultChecked | boolean | No | false | uncontrolled |
| onChange | function | No | — | (checked: boolean) => void |
| describedBy | string | No | — | Field wires hint and error ids onto the switch |