API REFERENCE · FORM CONTROLS
<dj-checkbox>
A form-associated checkbox composing <dj-label>. Submits value (default "on") when checked, nothing when not. Mirrors required-validity to the host.
npm install @dojo-ng/checkbox
import "@dojo-ng/checkbox";
Properties
| Property | Attribute | Type | Default |
|---|---|---|---|
checked |
checked reflected |
boolean |
false |
value |
value |
string |
"on" |
name |
name reflected |
string |
None |
disabled |
disabled reflected |
boolean |
false |
readonly |
readonly reflected |
boolean |
false |
required |
required reflected |
boolean |
false |
labelHidden |
label-hidden |
boolean |
false |
Events
change
Slots
Default slot
CSS parts
Style these with dj-checkbox::part(name).
| Part | Description |
|---|---|
control | the box |
label |
Methods
checkValidity(): booleanreportValidity(): booleanfocus(options: FocusOptions)restoreFormState(state: File | string | FormData | null)