React Selection Controls

Checkbox, RadioGroup, and Switch — built on real native inputs (visually hidden, mirrored by drawn controls via peer classes), so forms submit, labels click, screen readers announce, and keyboard focus behaves exactly like the platform. Checkbox supports the indeterminate parent-of-partial-selection state; radios and checkboxes take an optional description line; Switch uses role="switch".

Deliverables

Temperature grade

Build options

Installation

npx shadcn@latest add "http://localhost:3000/registry/selection-controls.json"

Usage

Loading...

Props

Checkbox / Switch

Native <input> attributes (checked, defaultChecked, onChange, disabled, …) plus:

PropTypeDefaultDescription
labelstring—Label rendered beside the control
descriptionstring—Secondary line under the label
indeterminatebooleanfalseCheckbox only — mixed/partial state

RadioGroup

PropTypeDefaultDescription
namestring—Shared input name for the group
optionsRadioOption[]—{ value, label, description?, disabled? }
valuestring—Selected value
onChange(value: string) => void—Selection callback
labelstring—Accessible group label

New components every week

Get the week's new Kelvin UI components and templates in one short email. No spam, unsubscribe anytime.