Component

Checkbox

Some default theming for form-item--checkboxes.

This is a javascript-free implementation that respects keyboard accessibility and has a disabled state.

We also have the theming for a switcher variation of the checkbox included.

Using the switcher variation

Single checkboxes can be used as switchers by setting the variation variable as 'switcher':

$form['switcher'] = [
  '#title' => $this->t('Switcher variation'),
  '#type' => 'checkbox',
  '#variation' => 'switcher',
];

 

Feel free to use this variable to come up with different variations.

form-item--checkbox
Drupal Core
Using Sass
Responsive
Accessible
HTML
CSS
Flat design
7 downloads
horizontal beam No open issue

comments

No comments yet