doodle-ui

Checkbox

Radix checkbox with a sketch square. The checkmark is a rough.js path, not a font glyph.

<Checkbox label="Keep the wobble" defaultChecked roughness={1.5} />

Usage

import { Checkbox } from "doodleui-react";

<Checkbox label="Keep the wobble" defaultChecked />

Keyboard, mixed state, and aria-checked come from Radix. doodle-ui only skins the box.

Props

PropTypeDefaultNotes
labelReactNodeundefinedCaption sitting to the right of the box.
checkedboolean | 'indeterminate'undefinedRadix controlled value.
onCheckedChange(checked: boolean | 'indeterminate') => voidundefinedRadix change handler.
roughnessnumber1.5How wobbly the stroke is. 0 is almost geometric. 3+ is messy.
seednumberprovider / randomLocks the sketch. Omit to follow SketchSeedProvider (Shuffle) or a mount-time random seed.
sketchColorstring#1f1d1aStroke color. Also tints primary/accent fills where relevant.
classNamestringundefinedPassed through to the root element.
styleCSSPropertiesundefinedPassed through to the root element.