Kodza

Switch

A real checkbox redrawn as a switch: the ink fills the track behind the thumb, the thumb stretches while pressed and springs into place. Labels, toolbars too.

Forms No dependencies switchtoggleformsettings Added Jan 2026
/anim/switch-toggle/ 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.

Use Kodza Switch for the toggles of my settings page.

Not plugged in yet?
claude mcp add -t http kodza https://kodza.dev/api/mcp
Also in Codex, Cursor and VS Code.
kodza-switch-toggle.html
<div class="kodza-switch">
  <label class="kodza-switch__row">
    <span class="kodza-switch__text">Dark mode<small>Easier on the eyes at 2 a.m.</small></span>
    <input class="kodza-switch__input" type="checkbox" role="switch" checked>
    <span class="kodza-switch__track" aria-hidden="true"><span class="kodza-switch__thumb"></span></span>
  </label>
  <label class="kodza-switch__row">
    <span class="kodza-switch__text">Email me when it ships<small>One email per release. We promise.</small></span>
    <input class="kodza-switch__input" type="checkbox" role="switch">
    <span class="kodza-switch__track" aria-hidden="true"><span class="kodza-switch__thumb"></span></span>
  </label>
  <label class="kodza-switch__row">
    <span class="kodza-switch__text">Deploy on Fridays<small>Not on our watch.</small></span>
    <input class="kodza-switch__input" type="checkbox" role="switch" disabled>
    <span class="kodza-switch__track" aria-hidden="true"><span class="kodza-switch__thumb"></span></span>
  </label>
</div>

<div class="kodza-switch kodza-switch--labels">
  <label class="kodza-switch__row">
    <span class="kodza-switch__text">Autosave<small>Your work, saved before you think of it.</small></span>
    <input class="kodza-switch__input" type="checkbox" role="switch" checked>
    <span class="kodza-switch__track" aria-hidden="true"><span class="kodza-switch__words"><span>On</span><span>Off</span></span><span class="kodza-switch__thumb"></span></span>
  </label>
</div>

<div class="kodza-switch kodza-switch--inline">
  <label class="kodza-switch__row">
    <span class="kodza-switch__text">No JavaScript<small>12</small></span>
    <input class="kodza-switch__input" type="checkbox" role="switch">
    <span class="kodza-switch__track" aria-hidden="true"><span class="kodza-switch__thumb"></span></span>
  </label>
</div>

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.

More like this

More in Forms