Checkbox
Material 3 checkbox guidance, checked and indeterminate states, browser form behavior, and accessibility.
Checkboxes represent independent binary choices and can also display an indeterminate state when a parent choice summarizes mixed child selections.
import { Checkbox } from '@m3-ui/ui';
<Checkbox name="remember" defaultSelected>
Remember this device
</Checkbox>When to use
Use checkboxes when each option can be selected independently. Use radio buttons when exactly one option in a set is allowed, and use a switch for an immediate on/off setting where changing the state takes effect directly.
States
The public component distinguishes unchecked, checked, indeterminate, and disabled states.
<Checkbox>Unchecked</Checkbox>
<Checkbox defaultSelected>Checked</Checkbox>
<Checkbox isIndeterminate>Partially selected</Checkbox>
<Checkbox isDisabled>Disabled</Checkbox>isIndeterminate communicates mixed/partial selection. It is not a substitute for the application's actual selected value; application logic remains responsible for resolving parent/child selection state.
Behavior and form semantics
React Aria owns checkbox semantics, keyboard activation, controlled/uncontrolled selection, focus-visible behavior, and native form-related props such as name and value.
Visible children act as the label. Material tokens own the box, check/indeterminate mark, state layers, ripple, colors, and minimum interaction geometry.
Accessibility
Prefer a visible label. If a checkbox intentionally has no visible label, provide an accessible name through the inherited React Aria props.
Do not use color or the checkmark alone to communicate a validation message; pair invalid form state with accessible text and the surrounding field/form relationships described in the Forms guide.
API reference
Checkbox
Checkbox({ children, className, onPressEnd, onPressStart, ...props }: CheckboxProps): JSX.ElementInherited React / web props (110)
| Name | Type | Default | Description | Origin |
|---|---|---|---|---|
aria-controls | string | undefined | — | Identifies the element (or elements) whose contents or presence are controlled by the current element. | react-aria |
aria-describedby | string | undefined | — | Identifies the element (or elements) that describes the object. | @react-types/shared |
aria-details | string | undefined | — | Identifies the element (or elements) that provide a detailed, extended description for the object. | @react-types/shared |
aria-errormessage | string | undefined | — | Identifies the element that provides an error message for the object. | @react-types/shared |
aria-label | string | undefined | — | Defines a string value that labels the current element. | @react-types/shared |
aria-labelledby | string | undefined | — | Identifies the element (or elements) that labels the current element. | @react-types/shared |
autoFocus | boolean | undefined | — | Whether the element should receive focus on render. | @react-types/shared |
children | ChildrenOrFunction<CheckboxRenderProps> | — | The children of the component. A function may be provided to alter the children based on component state. | react-aria-components |
className | ClassNameOrFunction<CheckboxRenderProps> | undefined | 'react-aria-Checkbox' | The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state. | react-aria-components |
defaultSelected | boolean | undefined | — | Whether the element should be selected (uncontrolled). | react-stately |
dir | string | undefined | — | — | @react-types/shared |
excludeFromTabOrder | boolean | undefined | — | Whether to exclude the element from the sequential tab order. If true, the element will not be focusable via the keyboard by tabbing. This should be avoided except in rare scenarios where an alternative means of accessing the element or its functionality via the keyboard is available. | @react-types/shared |
form | string | undefined | — | The `<form>` element to associate the input with. The value of this attribute must be the id of a `<form>` in the same document. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#form). | @react-types/shared |
hidden | boolean | undefined | — | — | @react-types/shared |
id | string | undefined | — | The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id). | @react-types/shared |
inert | boolean | undefined | — | — | @react-types/shared |
inputRef | React.Ref<HTMLInputElement | null> | undefined | — | A ref for the HTML input element. | react-aria-components |
isDisabled | boolean | undefined | — | Whether the input is disabled. | @react-types/shared |
isIndeterminate | boolean | undefined | — | Indeterminism is presentational only. The indeterminate visual representation remains regardless of user interaction. | react-aria |
isInvalid | boolean | undefined | — | Whether the input value is invalid. | @react-types/shared |
isReadOnly | boolean | undefined | — | Whether the input can be selected but not changed by the user. | @react-types/shared |
isRequired | boolean | undefined | — | Whether user input is required on the input before form submission. | @react-types/shared |
isSelected | boolean | undefined | — | Whether the element should be selected (controlled). | react-stately |
lang | string | undefined | — | — | @react-types/shared |
name | string | undefined | — | The name of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). | @react-types/shared |
onAnimationEnd | AnimationEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onAnimationEndCapture | AnimationEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onAnimationIteration | AnimationEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onAnimationIterationCapture | AnimationEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onAnimationStart | AnimationEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onAnimationStartCapture | AnimationEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onAuxClick | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onAuxClickCapture | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onBlur | ((e: FocusEvent<Element, Element>) => void) | undefined | — | Handler that is called when the element loses focus. | @react-types/shared |
onChange | ((isSelected: boolean) => void) | undefined | — | Handler that is called when the element's selection state changes. | react-stately |
onClick | ((e: MouseEvent<FocusableElement>) => void) | undefined | — | **Not recommended – use `onPress` instead.** `onClick` is an alias for `onPress` provided for compatibility with other libraries. `onPress` provides additional event details for non-mouse interactions. | @react-types/shared |
onClickCapture | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onContextMenu | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onContextMenuCapture | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onDoubleClick | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onDoubleClickCapture | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onFocus | ((e: FocusEvent<Element, Element>) => void) | undefined | — | Handler that is called when the element receives focus. | @react-types/shared |
onFocusChange | ((isFocused: boolean) => void) | undefined | — | Handler that is called when the element's focus status changes. | @react-types/shared |
onGotPointerCapture | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onGotPointerCaptureCapture | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onHoverChange | ((isHovering: boolean) => void) | undefined | — | Handler that is called when the hover state changes. | @react-types/shared |
onHoverEnd | ((e: HoverEvent) => void) | undefined | — | Handler that is called when a hover interaction ends. | @react-types/shared |
onHoverStart | ((e: HoverEvent) => void) | undefined | — | Handler that is called when a hover interaction starts. | @react-types/shared |
onKeyDown | ((e: KeyboardEvent) => void) | undefined | — | Handler that is called when a key is pressed. | @react-types/shared |
onKeyUp | ((e: KeyboardEvent) => void) | undefined | — | Handler that is called when a key is released. | @react-types/shared |
onLostPointerCapture | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onLostPointerCaptureCapture | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onMouseDown | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onMouseDownCapture | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onMouseEnter | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onMouseLeave | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onMouseMove | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onMouseMoveCapture | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onMouseOut | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onMouseOutCapture | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onMouseOver | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onMouseOverCapture | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onMouseUp | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onMouseUpCapture | MouseEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onPointerCancel | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onPointerCancelCapture | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onPointerDown | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onPointerDownCapture | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onPointerEnter | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onPointerLeave | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onPointerMove | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onPointerMoveCapture | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onPointerOut | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onPointerOutCapture | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onPointerOver | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onPointerOverCapture | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onPointerUp | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onPointerUpCapture | PointerEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onPress | ((e: PressEvent) => void) | undefined | — | Handler that is called when the press is released over the target. | @react-types/shared |
onPressChange | ((isPressed: boolean) => void) | undefined | — | Handler that is called when the press state changes. | @react-types/shared |
onPressEnd | ((e: PressEvent) => void) | undefined | — | Handler that is called when a press interaction ends, either over the target or when the pointer leaves the target. | @react-types/shared |
onPressStart | ((e: PressEvent) => void) | undefined | — | Handler that is called when a press interaction starts. | @react-types/shared |
onPressUp | ((e: PressEvent) => void) | undefined | — | Handler that is called when a press is released over the target, regardless of whether it started on the target or not. | @react-types/shared |
onScroll | UIEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onScrollCapture | UIEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTouchCancel | TouchEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTouchCancelCapture | TouchEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTouchEnd | TouchEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTouchEndCapture | TouchEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTouchMove | TouchEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTouchMoveCapture | TouchEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTouchStart | TouchEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTouchStartCapture | TouchEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTransitionCancel | TransitionEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTransitionCancelCapture | TransitionEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTransitionEnd | TransitionEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTransitionEndCapture | TransitionEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTransitionRun | TransitionEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTransitionRunCapture | TransitionEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTransitionStart | TransitionEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onTransitionStartCapture | TransitionEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onWheel | WheelEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
onWheelCapture | WheelEventHandler<HTMLLabelElement> | undefined | — | — | @react-types/shared |
render | DOMRenderFunction<"label", CheckboxRenderProps> | undefined | — | Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components. Requirements: - You must render the expected element type (e.g. if `<button>` is expected, you cannot render an `<a>`). - Only a single root DOM element can be rendered (no fragments). - You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate. | react-aria-components |
slot | string | null | undefined | — | A slot name for the component. Slots allow the component to receive props from a parent component. An explicit `null` value indicates that the local props completely override all props received from a parent. | react-aria-components |
style | StyleOrFunction<CheckboxRenderProps> | undefined | — | The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the element. A function may be provided to compute the style based on component state. | react-aria-components |
translate | "yes" | "no" | undefined | — | — | @react-types/shared |
validate | ((value: boolean) => ValidationError | true | null | undefined) | undefined | — | A function that returns an error message if a given value is invalid. Validation errors are displayed to the user when the form is submitted if `validationBehavior="native"`. For realtime validation, use the `isInvalid` prop instead. | @react-types/shared |
validationBehavior | "native" | "aria" | undefined | 'native' | Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA. | react-aria-components |
value | string | undefined | — | The value of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefvalue). | react-stately |
Source: packages/ui/src/components/Checkbox/Checkbox.tsx:20
Material fidelity and web adaptation
- Family
- Checkboxes
- Provenance
- spec: Material 3 overview · web: Browser and React Aria semantics · adaptation: m3-ui web adaptation
- Compose mapping
- Checkbox
- Visual fidelity
- partial: Legacy visual fidelity has not received an explicit reviewed disposition. Current implementation evidence: Implements unchecked, checked, indeterminate, disabled, hover, focus, and pressed presentation using canonical control tokens and the shared Material ripple engine.
- Behavior fidelity
- adapted: React Aria owns checkbox semantics, selection state, keyboard interaction, focus visibility, and labeling. The Material box, mark, minimum interactive target, and state layer are rendered around those web semantics.
- Semantics fidelity
- adapted: React Aria owns checkbox semantics, selection state, keyboard interaction, focus visibility, and labeling. The Material box, mark, minimum interactive target, and state layer are rendered around those web semantics.
- Adaptations
- React Aria owns checkbox semantics, selection state, keyboard interaction, focus visibility, and labeling. The Material box, mark, minimum interactive target, and state layer are rendered around those web semantics.
Material supplies the visual states and selection intent. React Aria/browser semantics provide the accessible checkbox role, keyboard behavior, and native form participation.
Related components
- Radio button — one-of-many choices.
- Switch — immediate on/off settings.
- Forms and validation — cross-component form composition.