@amsterdam/design-system-css
Version:
Stylesheets for all components from the Amsterdam Design System and some general utilities. Use it to apply the visual design of the City of Amsterdam to your HTML elements or non-React components.
25 lines (15 loc) • 971 B
Markdown
<!-- @license CC0-1.0 -->
A switch is a control element to toggle between two different states quickly.
A switch applies to a page or the entire system, such as an on/off switch.
- A Switch must have a label, and in most cases, this label should be visible.
- Switch only between two different states.
It is a binary action.
- The action takes place immediately when the user operates the switch.
- [WCAG 1.3.5](https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html): it is both clear for a user and programmatically what the purpose of a form field is.
Switch is an interactive element, and the [general requirements and guidelines for interactivity](/docs/docs-developer-guide-interactivity--docs) apply.
- [Switch Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/switch/)
- [Role switch](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/switch_role)