Components
Switch
Let users toggle a setting on or off.
Work in progress
This section is not defined in the Dr. Max Design System library (design.drmax.eu) yet. See the Developer tab for usage.
The component renders a native checkbox input associated with its visible label, so assistive technology announces the label together with the on/off state. Validation errors set aria-invalid on the input and are linked to it via aria-describedby; extra ARIA attributes can be passed through the accessibility prop.
Keyboard navigation
| Keys | Action |
|---|---|
Tab | Focus lands on the (non-disabled) switch. |
Space | Toggles the on/off state. |