Kodza

Toggle Group

Several on/off choices on real checkboxes. A picked option fills with ink from its centre and its plus turns into a check; picked days side by side join into one band. Pure CSS.

Forms No dependencies toggle groupcheckboxchipsfilterdaysform Added Nov 2026
/anim/toggle-group/ GitHub Fullscreen

With your AI

Just ask.

Say it to your AI. It gets the exact code below, not its best guess, and knows where it goes.

Add the Kodza Toggle Group to my page.

Not plugged in yet?
claude mcp add -t http kodza https://kodza.dev/api/mcp
Also in Codex, Cursor and VS Code.
kodza-toggle-group.html
<fieldset class="kodza-toggle-group kodza-toggle-group--joined">
  <legend class="kodza-toggle-group__legend">Deploy days</legend>
  <div class="kodza-toggle-group__list">
    <label class="kodza-toggle-group__option">
      <input class="kodza-toggle-group__input" type="checkbox" name="deploy-days" value="mon" checked>
      <span class="kodza-toggle-group__label" aria-hidden="true">M</span>
      <span class="kodza-toggle-group__name">Monday</span>
    </label>
    <label class="kodza-toggle-group__option">
      <input class="kodza-toggle-group__input" type="checkbox" name="deploy-days" value="tue" checked>
      <span class="kodza-toggle-group__label" aria-hidden="true">T</span>
      <span class="kodza-toggle-group__name">Tuesday</span>
    </label>
    <label class="kodza-toggle-group__option">
      <input class="kodza-toggle-group__input" type="checkbox" name="deploy-days" value="wed" checked>
      <span class="kodza-toggle-group__label" aria-hidden="true">W</span>
      <span class="kodza-toggle-group__name">Wednesday</span>
    </label>
    <label class="kodza-toggle-group__option">
      <input class="kodza-toggle-group__input" type="checkbox" name="deploy-days" value="thu" checked>
      <span class="kodza-toggle-group__label" aria-hidden="true">T</span>
      <span class="kodza-toggle-group__name">Thursday</span>
    </label>
    <label class="kodza-toggle-group__option">
      <input class="kodza-toggle-group__input" type="checkbox" name="deploy-days" value="fri">
      <span class="kodza-toggle-group__label" aria-hidden="true">F</span>
      <span class="kodza-toggle-group__name">Friday</span>
    </label>
    <label class="kodza-toggle-group__option">
      <input class="kodza-toggle-group__input" type="checkbox" name="deploy-days" value="sat">
      <span class="kodza-toggle-group__label" aria-hidden="true">S</span>
      <span class="kodza-toggle-group__name">Saturday</span>
    </label>
    <label class="kodza-toggle-group__option">
      <input class="kodza-toggle-group__input" type="checkbox" name="deploy-days" value="sun">
      <span class="kodza-toggle-group__label" aria-hidden="true">S</span>
      <span class="kodza-toggle-group__name">Sunday</span>
    </label>
  </div>
</fieldset>

<fieldset class="kodza-toggle-group">
  <legend class="kodza-toggle-group__legend">Email me about</legend>
  <div class="kodza-toggle-group__list">
    <label class="kodza-toggle-group__option">
      <input class="kodza-toggle-group__input" type="checkbox" name="email-me" value="releases" checked>
      <span class="kodza-toggle-group__label"><svg class="kodza-toggle-group__mark" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path class="kodza-toggle-group__plus" d="M8 3v10M3 8h10"/><path class="kodza-toggle-group__check" d="M3 8.5l3.2 3.2L13 4.5" pathLength="1"/></svg>Releases</span>
    </label>
    <label class="kodza-toggle-group__option">
      <input class="kodza-toggle-group__input" type="checkbox" name="email-me" value="breaking" checked>
      <span class="kodza-toggle-group__label"><svg class="kodza-toggle-group__mark" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path class="kodza-toggle-group__plus" d="M8 3v10M3 8h10"/><path class="kodza-toggle-group__check" d="M3 8.5l3.2 3.2L13 4.5" pathLength="1"/></svg>Breaking changes</span>
    </label>
    <label class="kodza-toggle-group__option">
      <input class="kodza-toggle-group__input" type="checkbox" name="email-me" value="components">
      <span class="kodza-toggle-group__label"><svg class="kodza-toggle-group__mark" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path class="kodza-toggle-group__plus" d="M8 3v10M3 8h10"/><path class="kodza-toggle-group__check" d="M3 8.5l3.2 3.2L13 4.5" pathLength="1"/></svg>New components</span>
    </label>
    <label class="kodza-toggle-group__option">
      <input class="kodza-toggle-group__input" type="checkbox" name="email-me" value="digest">
      <span class="kodza-toggle-group__label"><svg class="kodza-toggle-group__mark" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path class="kodza-toggle-group__plus" d="M8 3v10M3 8h10"/><path class="kodza-toggle-group__check" d="M3 8.5l3.2 3.2L13 4.5" pathLength="1"/></svg>Weekly digest</span>
    </label>
  </div>
</fieldset>

Checked

Checked before you paste.

Robots poked at it before you did. Every component goes through the same checks, and again each time it changes.

What ranLast run
Accessibilityaxe-core 4.10.2: the WCAG 2.1 A and AA rules, plus best practices. 0 issues
KeyboardThe Tab key gets there, and the focus ring shows when it does. Passed
Reduced motionTurn on reduced motion and what moved just appears. Nothing loops. Passed
Light and darkThe same checks on both themes, contrast included. Passed
WordPressPasted into Twenty Twenty-Five, Twenty Twenty-One, Astra, Blocksy, GeneratePress, Hello Elementor, Kadence and OceanWP. Nothing to flag. 8 / 8 themes
Robots checked this. A human with VoiceOver hasn't yet.
KeyboardPress them in the preview
On an option
  • Turns the option on or offSpace

More like this

More in Forms