← Home v1.3.0

Docs / Components / Choice cards

Choice cards

Selectable cards for plans, extras or options: built on AceCSS buttons, selected with a class, aria-pressed or a checked radio inside. Pure CSS, accessible, dark mode ready.

Choice cards

Large selectable options, like a vehicle class, an insurance plan or a role. A card uses the secondary surface and gets a 2px brand ring when it's selected. The recommended way to build one is a <label> around a hidden radio, because it needs no JavaScript and works with the keyboard.

<label class="ace-btn ace-btn--secondary ace-choice-card">
  <input type="radio" name="plan" checked>
  <strong>Full cover</strong>
  <span>€0 excess · +€12 / day</span>
</label>

<!-- Or a button you toggle yourself: add .is-selected or aria-pressed="true" -->

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.

More components