Checkbox

Last updated: October 14, 2026

Animated checkbox with spring checkmark animation, indeterminate state support, and full accessibility.

Installation

npx smoothui-cli add checkbox

Features

Animated checkmark with spring path drawing, indeterminate support, and Base UI form integration (Radix twin via style). Scroll the sections below — the panel shows one state at a time.

States

Checked

The default toggle: click the box or its label to check and uncheck. The checkmark draws in with a spring path animation.

Indeterminate

Use indeterminate for partial selection — a parent “select all” row when some but not all children are checked. Renders aria-checked="mixed" with an animated dash icon.

Disabled

A non-interactive checkbox with muted fill and border (no root opacity wash). Pair with a label that uses matching muted styling so the whole row reads as unavailable.

Accessibility

Keyboard Interactions

KeyDescription
SpaceToggles the checkbox checked state
TabMoves focus to/from the checkbox

ARIA Attributes

AttributeElementPurpose
aria-checkedRoottrue, false, or "mixed" for indeterminate
role="checkbox"RootIdentifies the element as a checkbox (provided by Radix)
disabledRootDisables interaction and applies visual styling

Reduced Motion

This component respects prefers-reduced-motion via useReducedMotion from Motion. When reduced motion is preferred, the checkmark and indeterminate icon appear instantly without spring path animation.

Props

Powered by

motion.dev
base-ui