Checkbox

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

Open in v0

Last updated: April 16, 2026

Installation

npx smoothui-cli add checkbox

Features

  • Animated checkmark with spring path drawing animation
  • Indeterminate state with aria-checked="mixed" and animated dash icon
  • Disabled state support
  • Wraps Radix UI Checkbox for robust form integration
  • Works with HTML label elements via id prop

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

On this page

Created by

Improved by

Edu Calvo's avatar

Powered by

motion.dev
radix-ui