bearnie

Checkbox

Toggle between checked and unchecked states.

Installation

npx bearnie add checkbox
npx bearnie add checkbox

Usage

import { Checkbox } from "@/components/ui/checkbox"
<Checkbox id="terms" />

Examples

Checked

Disabled

With description

Receive emails about new products and features.

Anatomy

  • Checkbox - A single form input element

Props

Checkbox

PropTypeDefaultDescription
idstring-Element ID for label association
namestring-Form field name
checkedbooleanfalseDefault checked state
disabledbooleanfalseDisables the checkbox
requiredbooleanfalseMakes the field required
valuestring-Form value when checked
classstring-Additional CSS classes