Switch


You can use this switch component to display on and off content, such as for settings or simple controls. By changing the aria-checked attribute from true or false will animate the switch on/off.

View example of the switch pattern

Import

To import just this component into your project, copy the snippet below and include it in your main Sass file.

@import 'patterns_switch';

For more information see Customising Vanilla in your projects, which includes overrides and importing instructions.

Design

For more information view the switch design spec, which includes the specification in markdown format and a PNG image.