Skip to content
Ballpoint

Checkbox

A drawn box that ticks with a pull up and out past the corner, and dashes when indeterminate.

From shadcn/ui
Built on Base UI Checkbox

Once a month, written by hand. Well, typed.

Installation

pnpm dlx shadcn@latest add @ballpoint/checkbox

Usage

tsx
import { Checkbox } from "@/components/ui/checkbox"
import { Label } from "@/components/ui/label"

<Label>
  <Checkbox defaultChecked />
  Send me the newsletter
</Label>

Examples

States

Unchecked, checked, mixed, disabled, and invalid with an error.

You need to agree to continue.

Choice cards

Wrap a Field in FieldLabel and the whole row becomes the target.

Select all

A parent that is mixed when only some children are ticked.

In a form

A required box with a description and an error after a try.

Nothing in them is surprising. We checked.

API reference

indeterminate
boolean

Draws a dash instead of a tick.

seed
string | number

Pins the drawing.

Every other prop goes to Base UI's Checkbox.

Pen settings

The drawing also takes draw, roughness, passes, radius, corners, weight and speed, as props or from the nearest InkProvider. What each one does.