Checkbox

The native checkbox with an indeterminate state, paired with its label through a field, for forms and select-all lists.

Available in
  • Angular: available
  • Vue: available
  • React: available
  • React Native: available

Usage

Partly read.

Import

ts
import {
  SoneCheckboxDirective,
} from "@surface-one/angular/checkbox";

API reference

SoneCheckboxDirectiveDirective

`input[soneCheckbox]` — the native checkbox (spartan/ui Checkbox, native first): it stays an `<input type="checkbox">`, so `[checked]`, `(change)`, `ngModel`, `formControl`, `required` and a `<label for>` all work as they do on any checkbox, and the global form styles draw it. The directive adds the mixed state the markup cannot express: `[(indeterminate)]`, cleared when the user toggles it.

Selector
input[soneCheckbox]
Export as
soneCheckbox
Inputs
NameType Default
indeterminatetwo-way

The mixed state ("some of them") — `[(indeterminate)]`; a click clears it.

booleanfalse