Skip to content

Animated Checkbox Styles

Four pure CSS checkbox styles with SVG check marks that draw themselves: filled square, bouncing circle, task strike-through and sketch.

Also known as: animated checkbox, custom checkbox styles, checkbox check mark animation, to-do list checkbox, svg checkbox animation

Animated Checkbox Styles live demo

Open in new tab

Pure CSS code (HTML, CSS)

A collection of four animated checkbox styles built with pure CSS and no JavaScript: a filled square, a bouncing circle, a task item that crosses itself out and a hand-drawn sketch check. Each check mark is an SVG path that draws itself when the box is ticked. Use them in settings pages, filters, to-do lists, sign-up forms and consent checkboxes.

How it works

The root section.ack-gallery holds an .ack-grid of four fieldset.ack-set cards, each with a legend.ack-legend and three label.ack-item rows. Inside each label is the real input.ack-input (visually hidden but still focusable), an .ack-box that draws the box, and the .ack-text. The box contains an inline SVG .ack-icon with one path that has pathLength="1", so stroke-dasharray: 1 and stroke-dashoffset: 1 hide it regardless of its real length. The :checked + .ack-box selector sets the offset to 0, and the transition draws the stroke. The path is also hidden with opacity while unchecked so the round line cap never leaves a dot.

Each modifier class adds its own touch. .ack-set--draw fills the square with the accent color before the white check appears. .ack-set--pop makes the box round, runs the ack-pop bounce and sends out a fading ack-ring pulse from ::after. .ack-set--strike draws an accent-colored check and then a line across the .ack-text via a scaled ::after. .ack-set--sketch uses a longer, curved path that overshoots the box like a pen stroke. Disabled inputs are dimmed with a not-allowed cursor.

Customization

  • --ack-draw, --ack-pop, --ack-strike and --ack-sketch on .ack-gallery: the accent color of each style, shown on the card's top border, fills and strokes.
  • --ack-size: the size of every box; the check mark scales with it.
  • --ack-speed: the base animation duration; 0.6s gives a slower, more noticeable draw.
  • --ack-focus: the focus ring color around the box.
  • Copy one label.ack-item into any form and wrap it in an element with the matching .ack-set--* class to reuse a style on its own.
  • grid-template-columns in the .ack-grid media queries: one column on phones, two from 600 px and four from 1000 px.

Use cases

  • Task and to-do apps: a strike-through checkbox style crosses out finished items
  • Settings and preference forms: four styles show filled square, bouncing circle and sketch checks
  • Sign-up forms: animated check marks make terms and newsletter boxes feel polished
  • Playful interfaces: self-drawing SVG ticks add motion without any JavaScript

Accessibility

Every checkbox is a native input type="checkbox" inside its label, so clicking the text toggles it, the Space key works, and forms submit the name and value as usual. Each group is a fieldset with a legend, so screen readers announce the group name. The decorative .ack-box is aria-hidden. Keyboard focus shows a 3 px outline around the box via :focus-visible. With prefers-reduced-motion: reduce, --ack-speed drops to almost zero and the bounce and pulse animations are removed, so states change instantly.

Usage notes

The styles rely only on sibling selectors; :has() is used just for the disabled cursor and the color-mix() tint in the strike style needs a current browser.

Animated Checkbox Styles at a glance

Framework
Pure CSS
Code
HTML, CSS
JavaScript
Not needed, CSS only
Dependencies
None
Layout
Responsive, works on mobile
Category
Checkboxes & Radios
License
Free for personal and commercial use

Questions about this template

Can I use the Animated Checkbox Styles code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

There is nothing to install. Paste the HTML where the component should appear and add the CSS to your stylesheet. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. It is built with HTML and CSS only, so there is no JavaScript to load.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

No dependencies. Pure HTML, CSS and JavaScript.

Animated Checkbox Styles – free Pure CSS checkbox & radio template
Animated Checkbox Styles · free Pure CSS checkbox & radio template

More Checkboxes & Radios

Checkbox List with Select All – free Bootstrap 6 checkbox & radio template

Checkbox List with Select All

Bootstrap 6 member list with a select-all checkbox that turns indeterminate, a live counter, Shift+click ranges and bulk action buttons.

Radio Button Cards – free Bootstrap 6 checkbox & radio template

Radio Button Cards

Bootstrap 6 radio inputs styled as selectable plan and shipping cards with .form-field-card, a live price summary and a simulated submit.

Checkbox and Radio Styles – free Bootstrap 6 checkbox & radio template

Checkbox and Radio Styles

Bootstrap 6 .check and .radio inputs in default, inline, disabled and indeterminate states, with size modifiers and a brand color set by CSS variables.

Custom Checkboxes and Switches – free Bootstrap 5 checkbox & radio template

Custom Checkboxes and Switches

Restyled Bootstrap 5 checkboxes, large switches, select-all with indeterminate state, radio cards and colored checkbox chips.

Radio Card Selector – free Tailwind CSS checkbox & radio template

Radio Card Selector

Tailwind CSS plan picker that turns native radio inputs into selectable pricing cards with a check indicator, focus ring and live summary.