Checkbox

A native checkbox; its label is clickable too.

Installation

Examples

Default

Wrap it and its text in a label. className goes on the span around it, and every other prop on the input, such as checked, onChange, and name. A column of them goes in a DragToggle, so a drag across them flips each one it passes.

demo.tsx

Disabled

disabled dims it, checked or not.

disabled.tsx

Anatomy

Each part's data-slot, which a theme styles, is beside it.