Kinetic Checkbox

A checkbox row with a drawn check mark that pops into place.

  • <kt-kinetic-checkbox>
  • Inputs
  • No framework

Kinetic Checkbox

The code

Copy the Kinetic Checkbox

Fastest: press Copy on the card above for one complete file. To build it into your own project, use the files below: the markup, the styles, this component’s script and the shared effects script (effects.js) that every component uses.

<kt-kinetic-checkbox checked label="Auto-sync tokens" sfx="バチッ!"></kt-kinetic-checkbox>

<kt-kinetic-checkbox label="Strict contrast" sfx="カチッ!"></kt-kinetic-checkbox>

<kt-kinetic-checkbox checked label="Hardware VFX" sfx="ドン!"></kt-kinetic-checkbox>

Attributes

NameWhat it doesDefault
checkedPresent when ticked.—
labelText beside the box.—
sfxSound-effect text on change.—

Keyboard and screen readers

  • role="checkbox" with aria-checked.
  • Space or Enter toggles.

Styling variables

Every look is a CSS variable: --kt-accent, --kt-accent-ink, --kt-radius-btn, --kt-surface-radius, --kt-surface-bg, --kt-border-w, --kt-comp-shadow and --font-sans. The copied file sets them all from your choices.

FAQ

Kinetic Checkbox: questions answered

How do I use the Kinetic Checkbox?

Press Copy on the card to get a complete HTML file, or copy the HTML, CSS and JavaScript tabs into your own page. In your markup the element is written as <kt-kinetic-checkbox>.

Which attributes does <kt-kinetic-checkbox> accept?

checked, label, sfx. Each one is described in the attributes table on this page.

Is the Kinetic Checkbox accessible?

role="checkbox" with aria-checked. Space or Enter toggles.

Can I change the Kinetic Checkbox colors, corners and font?

Yes. Use the options on this page: accent color, border radius, background, border, shadow and Google font. The copied code already contains your choices, and every one of them is a CSS variable you can edit later.