Data input

Checkbox

A native checkbox for an independent on/off choice, with a label, help text and error state.

Class nameTypeDescription
checkboxplf:checkboxComponentA native checkbox
choiceplf:choicePartA row of a control and its label
choice-labelplf:choice-labelPartThe label, the click target

Space or clicking the label toggles the checkbox.

Disabled

Say why a choice is unavailable in its label; the disabled state alone does not explain it.

Invalid

Your application adds and removes aria-invalid and the message; start the message with “Error:” so the state does not rely on color alone.

Error: accept the terms to continue.

Notifications

Choose any number of channels.

React

Checkbox from @pelatform/react renders this checkbox, in a choice row with its label when it has children, and takes its description and error state from a Field or FieldGroup around it.

Prop Values Default
children The label, in a choice row with the checkbox None: the checkbox alone

The other props are the native checkbox’s, checked, defaultChecked, onChange, className and ref included.

CSS variables

Override on a root or on a single choice row.

Variable Default
--plf-choice-size 1rem (16px)
--plf-choice-accent --plf-color-primary
--plf-control-height-md The label’s height on touch screens, at least 40px; 24px with a mouse

Built with Pelatform UIv0.1.0

Components

Getting started

Foundations

Components

Actions

Data display

Navigation

Feedback

Data input

Layout

Advanced

Integrations

Blocks

Application

Authentication

Icons