Search documentation

Find a component or a docs page

Checkbox

A control that allows the user to toggle between checked and not checked.

Usage

Example

Checked

Indeterminate

The mixed state, for example a "select all" box. The browser clears it on the first click.

Disabled

Invalid

Read only

Keeps its value and is submitted with the form, but can't be toggled.

Unchecked value

unchecked_value: renders a hidden input with the same name before the checkbox, so the form also sends a value when the box is unchecked (like Rails' check_box).

Installation

Components

ComponentBuilt usingSource
CheckboxPhlex
CheckboxDocsPhlex
CheckboxGroupPhlex
CheckboxControllerStimulus JS
CheckboxGroupControllerStimulus JS