Docs / Components / Checkbox, radio & switch
Checkbox, radio & switch
Styled native checkboxes, radio buttons and toggle switches in pure CSS: accessible labels, focus rings and dark mode, with no JavaScript.
Checkbox, radio, switch
These are native controls in the brand colour. Wrap each one in a <label> so the text is clickable too. Use a switch for settings that take effect immediately, and a checkbox for choices that are saved with a form.
<label class="ace-check"><input type="checkbox"> Full insurance</label> <label class="ace-check"><input type="radio" name="fuel"> Full-to-full</label> <label class="ace-switch"><input type="checkbox" role="switch"> Email notifications</label>
Use it
One stylesheet from the CDN, pinned to v1.3.0:
<link rel="stylesheet" href="https://acecss.dev/v1.3.0/ace.min.css"
integrity="sha384-zHAwOqjifsc0D+iUvzD1a4W0R2g0BOK9AqQJZGakUEp/Tm5IUcP07R9xkY0q/stj" crossorigin="anonymous">Or from npm:
npm i @acecss/core import '@acecss/core'
Bundlers, Tailwind, every script in one file and self-hosting: Install.