<oui-checkbox>
<label part="label">
<slot name="label"></slot>
</label>
<div part="indicator">
<slot name="indicator"></slot>
</div>
</oui-checkbox>
Slot Name | Description | Fallback Content |
---|---|---|
label | Add custom markup for the control’s label | Empty |
indicator | Content to indicate the checkbox is in a checked or indeterminate state | Element with checked and indeterminate indicators |
Slot Name | Description |
---|---|
label | The control’s label |
indicator | Indicates the checkbox is in a checked or indeterminate state |
State Group | States | Initial State | Description | Interaction/Transition |
---|---|---|---|---|
checked | true /false | false | When true , associates the control with the parent form data and displays the control with a checked appearance if not also indeterminate. | User click. Controlled programmatically. |
indeterminate | true /false | false | When true , displays the control with an indeterminate appearance. | No interaction. Controlled programmatically. |
disabled | true /false | false | When true , disables the control, preventing user interaction and displaying the control with a disabled appearance. | No interaction. Controlled programmatically. |
readonly | true /false | false | When true , the control’s checked value cannot be changed by user interaction. | No interaction. Controlled programmatically. |
Keyboard users can operate the <checkbox>
as follows:
<checkbox>
is eligible for document focus.<checkbox>
is eligible for autofocus
when the autofocus
attribute is present on the host.<checkbox>
can be the target of click
events (when not disabled
) either through mouse click, user tap, or keyboard space
key press.Control is eligible for all native from capabilities including:
Implements the checkbox role per the HTML AAM spec.