Checkbox
Props
Name | Type | Default | Description |
---|---|---|---|
"aria-activedescendant" | string | Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. | |
"aria-atomic" | Booleanish | Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. | |
"aria-autocomplete" | "list" | "none" | "inline" | "both" | Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be
presented if they are made. | |
"aria-braillelabel" | string | Defines a string value that labels the current element, which is intended to be converted into Braille. | |
"aria-brailleroledescription" | string | Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. | |
"aria-busy" | Booleanish | ||
"aria-checked" | boolean | "true" | "false" | "mixed" | Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. | |
"aria-colcount" | number | Defines the total number of columns in a table, grid, or treegrid. | |
"aria-colindex" | number | Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. | |
"aria-colindextext" | string | Defines a human readable text alternative of aria-colindex. | |
"aria-colspan" | number | Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. | |
"aria-controls" | string | Identifies the element (or elements) whose contents or presence are controlled by the current element. | |
"aria-current" | boolean | "step" | "true" | "false" | "page" | "location" | "date" | "time" | Indicates the element that represents the current item within a container or set of related elements. | |
"aria-describedby" | string | Identifies the element (or elements) that describes the object. | |
"aria-description" | string | Defines a string value that describes or annotates the current element. | |
"aria-details" | string | Identifies the element that provides a detailed, extended description for the object. | |
"aria-disabled" | Booleanish | Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. | |
"aria-errormessage" | string | Identifies the element that provides an error message for the object. | |
"aria-expanded" | Booleanish | Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. | |
"aria-flowto" | string | Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
allows assistive technology to override the general default of reading in document source order. | |
"aria-haspopup" | boolean | "true" | "false" | "menu" | "listbox" | "tree" | "grid" | "dialog" | Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. | |
"aria-hidden" | Booleanish | Indicates whether the element is exposed to an accessibility API. | |
"aria-invalid" | boolean | "true" | "false" | "grammar" | "spelling" | Indicates the entered value does not conform to the format expected by the application. | |
"aria-keyshortcuts" | string | Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. | |
"aria-label" | string | Defines a string value that labels the current element. | |
"aria-labelledby" | string | The id of the element that gives a label to this checkbox. Not needed when using the Label component in the checkbox's children. | |
"aria-level" | number | Defines the hierarchical level of an element within a structure. | |
"aria-live" | "off" | "assertive" | "polite" | Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. | |
"aria-modal" | Booleanish | Indicates whether an element is modal when displayed. | |
"aria-multiline" | Booleanish | Indicates whether a text box accepts multiple lines of input or only a single line. | |
"aria-multiselectable" | Booleanish | Indicates that the user may select more than one item from the current selectable descendants. | |
"aria-orientation" | "horizontal" | "vertical" | Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. | |
"aria-owns" | string | Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship
between DOM elements where the DOM hierarchy cannot be used to represent the relationship. | |
"aria-placeholder" | string | Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.
A hint could be a sample value or a brief description of the expected format. | |
"aria-posinset" | number | Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. | |
"aria-pressed" | boolean | "true" | "false" | "mixed" | Indicates the current "pressed" state of toggle buttons. | |
"aria-readonly" | Booleanish | Indicates that the element is not editable, but is otherwise operable. | |
"aria-relevant" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. | |
"aria-required" | Booleanish | Indicates that user input is required on the element before a form may be submitted. | |
"aria-roledescription" | string | Defines a human-readable, author-localized description for the role of an element. | |
"aria-rowcount" | number | Defines the total number of rows in a table, grid, or treegrid. | |
"aria-rowindex" | number | Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. | |
"aria-rowindextext" | string | Defines a human readable text alternative of aria-rowindex. | |
"aria-rowspan" | number | Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. | |
"aria-selected" | Booleanish | Indicates the current "selected" state of various widgets. | |
"aria-setsize" | number | Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. | |
"aria-sort" | "none" | "ascending" | "descending" | "other" | Indicates if items in a table or grid are sorted in ascending or descending order. | |
"aria-valuemax" | number | Defines the maximum allowed value for a range widget. | |
"aria-valuemin" | number | Defines the minimum allowed value for a range widget. | |
"aria-valuenow" | number | Defines the current value for a range widget. | |
"aria-valuetext" | string | Defines the human readable text alternative of aria-valuenow for a range widget. | |
about | string | ||
accept | string | ||
acceptCharset | string | ||
accessKey | string | ||
action | string | ||
allowFullScreen | boolean | ||
allowTransparency | boolean | ||
alt | string | ||
as | string | ||
async | boolean | ||
autoCapitalize | string | ||
autoComplete | string | ||
autoCorrect | string | ||
autoFocus | boolean | ||
autoPlay | boolean | ||
autoSave | string | ||
capture | boolean | "user" | "environment" | ||
cellPadding | string | number | ||
cellSpacing | string | number | ||
challenge | string | ||
changeDirtyState | (value?: string, valid?: boolean) => void | ||
charSet | string | ||
checked | boolean | ||
children | ReactNode | ||
cite | string | ||
classes | IClassName | ||
classID | string | ||
className | string | ||
clearSides | boolean | Makes the checkbox stand on its own line | |
color | string | ||
cols | number | ||
colSpan | number | ||
content | string | ||
contentEditable | Booleanish | "inherit" | ||
contextMenu | string | ||
controls | boolean | ||
coords | string | ||
crossOrigin | CrossOrigin | ||
dangerouslySetInnerHTML | { __html: string | TrustedHTML; } | ||
data | string | ||
datatype | string | ||
dateTime | string | ||
default | boolean | ||
defaultChecked | boolean | ||
defaultDisabled | boolean | Whether the checkbox is disabled initially. Only useful with connected checkboxes because their disabled state is managed by the PlasmaState. | |
defaultValue | string | ||
defer | boolean | ||
dir | string | ||
disabled | boolean | ||
disabledOnMount | boolean | ||
disabledTooltip | string | ||
download | any | ||
draggable | Booleanish | ||
encType | string | ||
form | string | ||
formAction | string | ||
formEncType | string | ||
formMethod | string | ||
formNoValidate | boolean | ||
formTarget | string | ||
frameBorder | string | number | ||
handleOnClick | (wasChecked: boolean) => void | A callback function that gets executed after the checkbox is clicked
| |
headers | string | ||
height | string | number | ||
hidden | boolean | ||
high | number | ||
href | string | ||
hrefLang | string | ||
htmlFor | string | ||
httpEquiv | string | ||
id | string | ||
indeterminate | boolean | ||
inlist | any | ||
innerInputClasses | IClassName | ||
inputMode | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | Hints at the type of data that might be entered by the user while editing the element or its contents | |
integrity | string | ||
is | string | Specify that a standard HTML element should behave like a defined custom built-in element | |
isReadOnly | boolean | ||
itemID | string | ||
itemProp | string | ||
itemRef | string | ||
itemScope | boolean | ||
itemType | string | ||
keyParams | string | ||
keyType | string | ||
kind | string | ||
label | string | ||
labelProps | ILabelProps | ||
labelTitle | ReactNode | ||
lang | string | ||
list | string | ||
loop | boolean | ||
low | number | ||
manifest | string | ||
marginHeight | number | ||
marginWidth | number | ||
max | string | number | ||
maximum | number | ||
maxLength | number | ||
media | string | ||
mediaGroup | string | ||
method | string | ||
min | string | number | ||
minimum | number | ||
minLength | number | ||
multiple | boolean | ||
muted | boolean | ||
name | string | ||
nonce | string | ||
noValidate | boolean | ||
onAbort | ReactEventHandler<HTMLInputElement> | ||
onAbortCapture | ReactEventHandler<HTMLInputElement> | ||
onAnimationEnd | AnimationEventHandler<HTMLInputElement> | ||
onAnimationEndCapture | AnimationEventHandler<HTMLInputElement> | ||
onAnimationIteration | AnimationEventHandler<HTMLInputElement> | ||
onAnimationIterationCapture | AnimationEventHandler<HTMLInputElement> | ||
onAnimationStart | AnimationEventHandler<HTMLInputElement> | ||
onAnimationStartCapture | AnimationEventHandler<HTMLInputElement> | ||
onAuxClick | MouseEventHandler<HTMLInputElement> | ||
onAuxClickCapture | MouseEventHandler<HTMLInputElement> | ||
onBeforeInput | FormEventHandler<HTMLInputElement> | ||
onBeforeInputCapture | FormEventHandler<HTMLInputElement> | ||
onBlur | (value: string) => void | ||
onBlurCapture | FocusEventHandler<HTMLInputElement> | ||
onCanPlay | ReactEventHandler<HTMLInputElement> | ||
onCanPlayCapture | ReactEventHandler<HTMLInputElement> | ||
onCanPlayThrough | ReactEventHandler<HTMLInputElement> | ||
onCanPlayThroughCapture | ReactEventHandler<HTMLInputElement> | ||
onChange | (value?: string, valid?: boolean) => void | ||
onChangeCapture | FormEventHandler<HTMLInputElement> | ||
onChangeHandler | ChangeEventHandler<HTMLInputElement> | ||
onClick | (e: MouseEvent<HTMLElement, MouseEvent>) => void | ||
onClickCapture | MouseEventHandler<HTMLInputElement> | ||
onCompositionEnd | CompositionEventHandler<HTMLInputElement> | ||
onCompositionEndCapture | CompositionEventHandler<HTMLInputElement> | ||
onCompositionStart | CompositionEventHandler<HTMLInputElement> | ||
onCompositionStartCapture | CompositionEventHandler<HTMLInputElement> | ||
onCompositionUpdate | CompositionEventHandler<HTMLInputElement> | ||
onCompositionUpdateCapture | CompositionEventHandler<HTMLInputElement> | ||
onContextMenu | MouseEventHandler<HTMLInputElement> | ||
onContextMenuCapture | MouseEventHandler<HTMLInputElement> | ||
onCopy | ClipboardEventHandler<HTMLInputElement> | ||
onCopyCapture | ClipboardEventHandler<HTMLInputElement> | ||
onCut | ClipboardEventHandler<HTMLInputElement> | ||
onCutCapture | ClipboardEventHandler<HTMLInputElement> | ||
onDestroy | () => void | ||
onDoubleClick | MouseEventHandler<HTMLInputElement> | ||
onDoubleClickCapture | MouseEventHandler<HTMLInputElement> | ||
onDrag | DragEventHandler<HTMLInputElement> | ||
onDragCapture | DragEventHandler<HTMLInputElement> | ||
onDragEnd | DragEventHandler<HTMLInputElement> | ||
onDragEndCapture | DragEventHandler<HTMLInputElement> | ||
onDragEnter | DragEventHandler<HTMLInputElement> | ||
onDragEnterCapture | DragEventHandler<HTMLInputElement> | ||
onDragExit | DragEventHandler<HTMLInputElement> | ||
onDragExitCapture | DragEventHandler<HTMLInputElement> | ||
onDragLeave | DragEventHandler<HTMLInputElement> | ||
onDragLeaveCapture | DragEventHandler<HTMLInputElement> | ||
onDragOver | DragEventHandler<HTMLInputElement> | ||
onDragOverCapture | DragEventHandler<HTMLInputElement> | ||
onDragStart | DragEventHandler<HTMLInputElement> | ||
onDragStartCapture | DragEventHandler<HTMLInputElement> | ||
onDrop | DragEventHandler<HTMLInputElement> | ||
onDropCapture | DragEventHandler<HTMLInputElement> | ||
onDurationChange | ReactEventHandler<HTMLInputElement> | ||
onDurationChangeCapture | ReactEventHandler<HTMLInputElement> | ||
onEmptied | ReactEventHandler<HTMLInputElement> | ||
onEmptiedCapture | ReactEventHandler<HTMLInputElement> | ||
onEncrypted | ReactEventHandler<HTMLInputElement> | ||
onEncryptedCapture | ReactEventHandler<HTMLInputElement> | ||
onEnded | ReactEventHandler<HTMLInputElement> | ||
onEndedCapture | ReactEventHandler<HTMLInputElement> | ||
onError | ReactEventHandler<HTMLInputElement> | ||
onErrorCapture | ReactEventHandler<HTMLInputElement> | ||
onFocus | FocusEventHandler<HTMLInputElement> | ||
onFocusCapture | FocusEventHandler<HTMLInputElement> | ||
onGotPointerCapture | PointerEventHandler<HTMLInputElement> | ||
onGotPointerCaptureCapture | PointerEventHandler<HTMLInputElement> | ||
onInput | FormEventHandler<HTMLInputElement> | ||
onInputCapture | FormEventHandler<HTMLInputElement> | ||
onInvalid | FormEventHandler<HTMLInputElement> | ||
onInvalidCapture | FormEventHandler<HTMLInputElement> | ||
onKeyDown | KeyboardEventHandler<HTMLInputElement> | ||
onKeyDownCapture | KeyboardEventHandler<HTMLInputElement> | ||
onKeyUp | KeyboardEventHandler<HTMLInputElement> | ||
onKeyUpCapture | KeyboardEventHandler<HTMLInputElement> | ||
onLoad | ReactEventHandler<HTMLInputElement> | ||
onLoadCapture | ReactEventHandler<HTMLInputElement> | ||
onLoadedData | ReactEventHandler<HTMLInputElement> | ||
onLoadedDataCapture | ReactEventHandler<HTMLInputElement> | ||
onLoadedMetadata | ReactEventHandler<HTMLInputElement> | ||
onLoadedMetadataCapture | ReactEventHandler<HTMLInputElement> | ||
onLoadStart | ReactEventHandler<HTMLInputElement> | ||
onLoadStartCapture | ReactEventHandler<HTMLInputElement> | ||
onLostPointerCapture | PointerEventHandler<HTMLInputElement> | ||
onLostPointerCaptureCapture | PointerEventHandler<HTMLInputElement> | ||
onMouseDown | MouseEventHandler<HTMLInputElement> | ||
onMouseDownCapture | MouseEventHandler<HTMLInputElement> | ||
onMouseEnter | MouseEventHandler<HTMLInputElement> | ||
onMouseLeave | MouseEventHandler<HTMLInputElement> | ||
onMouseMove | MouseEventHandler<HTMLInputElement> | ||
onMouseMoveCapture | MouseEventHandler<HTMLInputElement> | ||
onMouseOut | MouseEventHandler<HTMLInputElement> | ||
onMouseOutCapture | MouseEventHandler<HTMLInputElement> | ||
onMouseOver | MouseEventHandler<HTMLInputElement> | ||
onMouseOverCapture | MouseEventHandler<HTMLInputElement> | ||
onMouseUp | MouseEventHandler<HTMLInputElement> | ||
onMouseUpCapture | MouseEventHandler<HTMLInputElement> | ||
onPaste | ClipboardEventHandler<HTMLInputElement> | ||
onPasteCapture | ClipboardEventHandler<HTMLInputElement> | ||
onPause | ReactEventHandler<HTMLInputElement> | ||
onPauseCapture | ReactEventHandler<HTMLInputElement> | ||
onPlay | ReactEventHandler<HTMLInputElement> | ||
onPlayCapture | ReactEventHandler<HTMLInputElement> | ||
onPlaying | ReactEventHandler<HTMLInputElement> | ||
onPlayingCapture | ReactEventHandler<HTMLInputElement> | ||
onPointerCancel | PointerEventHandler<HTMLInputElement> | ||
onPointerCancelCapture | PointerEventHandler<HTMLInputElement> | ||
onPointerDown | PointerEventHandler<HTMLInputElement> | ||
onPointerDownCapture | PointerEventHandler<HTMLInputElement> | ||
onPointerEnter | PointerEventHandler<HTMLInputElement> | ||
onPointerEnterCapture | PointerEventHandler<HTMLInputElement> | ||
onPointerLeave | PointerEventHandler<HTMLInputElement> | ||
onPointerLeaveCapture | PointerEventHandler<HTMLInputElement> | ||
onPointerMove | PointerEventHandler<HTMLInputElement> | ||
onPointerMoveCapture | PointerEventHandler<HTMLInputElement> | ||
onPointerOut | PointerEventHandler<HTMLInputElement> | ||
onPointerOutCapture | PointerEventHandler<HTMLInputElement> | ||
onPointerOver | PointerEventHandler<HTMLInputElement> | ||
onPointerOverCapture | PointerEventHandler<HTMLInputElement> | ||
onPointerUp | PointerEventHandler<HTMLInputElement> | ||
onPointerUpCapture | PointerEventHandler<HTMLInputElement> | ||
onProgress | ReactEventHandler<HTMLInputElement> | ||
onProgressCapture | ReactEventHandler<HTMLInputElement> | ||
onRateChange | ReactEventHandler<HTMLInputElement> | ||
onRateChangeCapture | ReactEventHandler<HTMLInputElement> | ||
onRender | (value?: string, valid?: boolean, disabled?: boolean) => void | ||
onReset | FormEventHandler<HTMLInputElement> | ||
onResetCapture | FormEventHandler<HTMLInputElement> | ||
onResize | ReactEventHandler<HTMLInputElement> | ||
onResizeCapture | ReactEventHandler<HTMLInputElement> | ||
onScroll | UIEventHandler<HTMLInputElement> | ||
onScrollCapture | UIEventHandler<HTMLInputElement> | ||
onSeeked | ReactEventHandler<HTMLInputElement> | ||
onSeekedCapture | ReactEventHandler<HTMLInputElement> | ||
onSeeking | ReactEventHandler<HTMLInputElement> | ||
onSeekingCapture | ReactEventHandler<HTMLInputElement> | ||
onSelect | ReactEventHandler<HTMLInputElement> | ||
onSelectCapture | ReactEventHandler<HTMLInputElement> | ||
onStalled | ReactEventHandler<HTMLInputElement> | ||
onStalledCapture | ReactEventHandler<HTMLInputElement> | ||
onSubmit | FormEventHandler<HTMLInputElement> | ||
onSubmitCapture | FormEventHandler<HTMLInputElement> | ||
onSuspend | ReactEventHandler<HTMLInputElement> | ||
onSuspendCapture | ReactEventHandler<HTMLInputElement> | ||
onTimeUpdate | ReactEventHandler<HTMLInputElement> | ||
onTimeUpdateCapture | ReactEventHandler<HTMLInputElement> | ||
onTouchCancel | TouchEventHandler<HTMLInputElement> | ||
onTouchCancelCapture | TouchEventHandler<HTMLInputElement> | ||
onTouchEnd | TouchEventHandler<HTMLInputElement> | ||
onTouchEndCapture | TouchEventHandler<HTMLInputElement> | ||
onTouchMove | TouchEventHandler<HTMLInputElement> | ||
onTouchMoveCapture | TouchEventHandler<HTMLInputElement> | ||
onTouchStart | TouchEventHandler<HTMLInputElement> | ||
onTouchStartCapture | TouchEventHandler<HTMLInputElement> | ||
onTransitionEnd | TransitionEventHandler<HTMLInputElement> | ||
onTransitionEndCapture | TransitionEventHandler<HTMLInputElement> | ||
onVolumeChange | ReactEventHandler<HTMLInputElement> | ||
onVolumeChangeCapture | ReactEventHandler<HTMLInputElement> | ||
onWaiting | ReactEventHandler<HTMLInputElement> | ||
onWaitingCapture | ReactEventHandler<HTMLInputElement> | ||
onWheel | WheelEventHandler<HTMLInputElement> | ||
onWheelCapture | WheelEventHandler<HTMLInputElement> | ||
open | boolean | ||
optimum | number | ||
pattern | string | ||
placeholder | string | ||
playsInline | boolean | ||
poster | string | ||
prefix | string | ||
preload | string | ||
property | string | ||
radioGroup | string | ||
readOnly | boolean | ||
rel | string | ||
required | boolean | ||
resource | string | ||
results | number | ||
rev | string | ||
reversed | boolean | ||
role | AriaRole | ||
rows | number | ||
rowSpan | number | ||
sandbox | string | ||
scope | string | ||
scoped | boolean | ||
scrolling | string | ||
seamless | boolean | ||
security | string | ||
selected | boolean | ||
shape | string | ||
size | number | ||
sizes | string | ||
slot | string | ||
span | number | ||
spellCheck | Booleanish | ||
src | string | ||
srcDoc | string | ||
srcLang | string | ||
srcSet | string | ||
start | number | ||
step | string | number | ||
style | CSSProperties | ||
summary | string | ||
suppressContentEditableWarning | boolean | ||
suppressHydrationWarning | boolean | ||
tabIndex | number | ||
target | string | ||
title | string | ||
tooltipClasses | string | ||
translate | "yes" | "no" | ||
type | string | ||
typeof | string | ||
unselectable | "off" | "on" | ||
useMap | string | ||
valid | boolean | ||
validate | (value: any) => boolean | ||
validateOnChange | boolean | ||
validateOnMount | boolean | ||
value | string | ||
vocab | string | ||
width | string | number | ||
wmode | string | ||
wrap | string | ||
wrapperRef | MutableRefObject<HTMLDivElement> | ||
"aria-dropeffect" deprecated | "none" | "link" | "copy" | "execute" | "move" | "popup" | in ARIA 1.1 Indicates what functions can be performed when a dragged object is released on the drop target. | |
"aria-grabbed" deprecated | Booleanish | in ARIA 1.1 Indicates an element's "grabbed" state in a drag-and-drop operation. | |
onKeyPress deprecated | KeyboardEventHandler<HTMLInputElement> | ||
onKeyPressCapture deprecated | KeyboardEventHandler<HTMLInputElement> |
Examples
Connected to the PlasmaState
Disabled
A group of checkboxes
Best Practices
Use checkboxes so that users can select one or more options from a list, or none at all.
Use a stand-alone checkbox to toggle a single option on/off if the result is not immediately visible, e.g., when a final confirmation from the user is required to apply changes.
Conversely, if the result is applied immediately, such as a change of display, use a Toggle instead.
Aim for seven or less options. If that's impossible, consider breaking your set of options into several smaller logical sets or consider using Multi select instead.
List options in alphanumerical order unless a more suited ordering rationale applies, for example when listing size or security level options. If no rationale stands out, place options in alphanumerical order.
Labeling
Keep titles and labels short, preferably under three words.
Title
Always use a title when offering multiple options.
Provide a descriptive title without action verbs. For example, write "Grocery items" rather than "Select all grocery items".
For a stand-alone checkbox, the title is optional. Use a title only if you need to dissociate the stand-alone checkbox from other adjacent checkboxes.
Labels
Labels identify each option and should be self-explanatory.
Use a consistent writing style for all options in the list.
For a stand-alone checkbox, use a positive and active wording that clearly indicates what happens if the checkbox is selected. For example, write "Send me a text notification" rather than "Email notification".
Help Text and Instructions
Instructions provide more context on the outcome of the choice to make. Use it sparingly, only when it is critical to the user's understanding.
Feedback and Validation
If there is a maximum number of options that users can select, indicate it in a description.
If an option is recommended or the default, indicate it in its label.
The partially selected state is only allowed with checkboxes that have children options. A partially selected parent checkbox indicates that only some of its children options are selected.
Related Components
If your use case doesn't match the guidelines above, consider using one of the following components instead:
- Multi select - When there are more than seven options.
- Toggle - When the result applies immediately, for example with a change of display.
- Radio button - When options are mutually exclusive.