Skip to main content

Checkbox

Imports

import {Checkbox} from 'material-expressive-react';
import {Checkbox} from 'material-expressive-react/checkbox';

Props

PropTypeDefaultRequiredDescription
checkedbooleanNo
disabledbooleanNo
formHTMLFormElementNoReadonly associated form element (custom element form-associated API).
indeterminatebooleanNo
namestringNo
onChange((event: Event) => void)No
onInput((event: Event) => void)No
requiredbooleanNo
valuestringNo

Events

  • onChange → DOM event change
  • onInput → DOM event input

Slots

Material Web components frequently use named slots. In React, you can pass slot="..." on children (e.g. <Icon slot="icon" />).

If you need to slot a child component that does not accept a slot prop, use the Slotted utility (see Utilities → Slotted).

Examples

See Storybook for live examples and variants.