Skip to main content

Checks and radios

Create consistent cross-browser and cross-device checkboxes and radios with our completely rewritten checks component.

For the non-textual checkbox and radio controls, FormCheck provides a single component for both types that adds some additional styling and improved layout.

Default (stacked)

By default, any number of checkboxes and radios that are immediate sibling will be vertically stacked and appropriately spaced with FormCheck.

Result
Loading...
Live Editor

Switches

A switch has the markup of a custom checkbox but uses type="switch" to render a toggle switch. Switches also support the same customizable children as <FormCheck>.

Result
Loading...
Live Editor

Inline

Group checkboxes or radios on the same horizontal row by adding the inline prop.

Result
Loading...
Live Editor

Reverse

Put your checkboxes, radios, and switches on the opposite side with the reverse prop.

Result
Loading...
Live Editor

Without labels

When you render a FormCheck without a label (no children) some additional styling is applied to keep the inputs from collapsing.

Remember to add an aria-label when omitting labels!

Result
Loading...
Live Editor

Customizing FormCheck rendering

When you need tighter control, or want to customize how the FormCheck component renders, it may better to use its constituent parts directly.

By provided children to the FormCheck you can forgo the default rendering and handle it yourself. (You can still provide an id to the FormCheck or FormGroup and have it propagate to the label and input).

Result
Loading...
Live Editor

API

FormCheck

FormCheckInput

FormCheckLabel