Back to gallery

Checkbox

States in light and dark

Each panel sets its own theme scope, so the appearance control above does not change them. The two lower panels nest the opposite theme inside, and the nested checkboxes follow the nearest scope. Hover an unchecked box, press Tab to see the focus ring, and press Space to toggle. Disabled boxes ignore the pointer and the keyboard.

Light theme

Dark theme

Dark theme, with a light panel inside

Light theme, nested in dark

Light theme, with a dark panel inside

Dark theme, nested in light

Controlled state

Click cycles indeterminate to checked, checked to unchecked, unchecked to checked. Enter does not toggle; Space does.

checked: indeterminate, onCheckedChange calls: 0

Form participation

not submitted

Layout and labels

Right to left