[?] Component size, gzipped: 27kb
Checkbox
Props
Style Overrides
Theme
Beta
Checkboxes are used to provide users with multiple options for selection in a series of options.
When used as a toggle they allow the user to make a binary choice usually (but not limited) in the form of a yes/no or on/off suggestion. Toggles are often used in product settings or as filter options. When engaged (on), Base Web toggles are colored and when disengaged (off) they’re grey.
When to use
- When a collection of options share context.
- When a user wants to toggle an option on/off.
- When a user wants to select multiple options.
Examples
As with many of our components, there is also an uncontrolled version, StatefulCheckbox, which manages its own state.
Checkbox exports
You can import this module like so:
import {StatefulCheckbox} from 'baseui/checkbox'
It exports the following components or utility functions:
- StatefulCheckbox
- StatefulContainer
- Checkbox
- StyledRoot
- StyledCheckmark
- StyledLabel
- StyledInput
- StyledToggle
- StyledToggleInner
- StyledToggleTrack
- STATE_TYPE
- STYLE_TYPE
- LABEL_PLACEMENT