Checkbox

A checkbox toggles a single option on or off. RhombusKit wraps Material's <mat-checkbox> with the token contract and the same two binding modes as the other form controls, so colour reacts to the active theme automatically.

Example

When to use

  • Use a checkbox for an independent on/off choice (“Remember me”, accepting terms) where the change takes effect when the surrounding form is submitted.
  • Use one for a single binary toggle, or group several checkboxes when the user may select any number of options independently.

When not to use

  • To pick exactly one of several mutually-exclusive options, use a Radio group.
  • For a setting that takes effect immediately on toggle (no save step), use a Switch.
  • To trigger an action rather than capture a value, use a Button.

Related components

  • Radio — one of several mutually-exclusive choices.
  • Switch — instant-effect on/off toggle.
  • Input — single-line text in the same reactive-forms contract.
  • Select — choose from a longer list of options.

Was this page helpful?