Theme
Install with your agentnpx shadcn@4.23.1 add @goop/trail-checkbox

Checkbox

Free

A box a person ticks to turn one option on or off, for React and Tailwind CSS. Free, MIT.

Tick tasks by their words or Space, tick "Select all" to tick or clear them all; disable the boxes or mark them invalid from the panel. Nothing is saved. "Select all" shows mixed while only some tasks are ticked.

When to use

  • A box a person ticks to turn one option on or off.

When not to use

  • For one of several options use RadioGroup, for a setting that applies at once Switch.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Checkbox on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing.

Terminal
npx shadcn@4.23.1 add @goop/trail-checkbox
PROMPT
Add the Goop Checkbox to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { Checkbox } from '@/components/ui/goop/checkbox';

<label className="flex items-center gap-2">
  <Checkbox defaultChecked /> Email me a summary
</label>
  • Fits: settings, flow: field.
  • height, width, padding, corner, border, background, text, motion: add no class for these.

API reference

Options
OptionTypeWhat it does
onCheckedChange?(checked: boolean) => voidCalled after onChange with the box's new state, as the theme's switch and toggles report theirs.
indeterminate?booleanMixed: the box stands for a group only some of which is checked; the caller clears it when that changes.
checked?boolean
defaultChecked?boolean
onChange?(event: ChangeEvent<HTMLInputElement>) => void
value?string
name?string
required?boolean
disabled?boolean
form?string
  • State: checked (checked / defaultChecked / onCheckedChange); drawn by data-disabled
  • data-slot values (to select a part by): checkbox, checkbox-check, checkbox-holder, checkbox-mixed

Keyboard

KeyWhat it does
SpaceToggle

Accessibility

  • The native element answers the keyboard.
  • hover, active, focus-visible, focus-within, checked: the browser's own (:hover, :active, :focus-visible, :focus-within, :checked): write nothing

Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:

StateDrawn by
indeterminatethe attribute aria-checked=mixed
disabledthe attribute data-disabled
invalidthe attribute aria-invalid

Motion

  • The part sets its own motion: add no transition or animation of your own.
  • How the theme moves, and how to move your own parts the same way: Motion.

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/trail/components/checkbox.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add @goop/trail-checkbox

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.