Neobrutalism UI LogoNeobrutal UI

Checkbox

A customizable checkbox input with bold styling and accessible controls.

Installation

npx neobrutal add checkbox

Usage

import { Checkbox } from "@/components/ui/checkbox"
import { Label } from "@/components/ui/label"
<div className="flex items-center gap-2">
<Checkbox id="terms" />
<Label htmlFor="terms">Accept terms and conditions</Label>
</div>

Examples

States

Props

PropTypeDefaultDescription
checkedboolean | 'indeterminate'-The controlled checked state of the checkbox.
defaultCheckedboolean-The default checked state when uncontrolled.
onCheckedChange(checked: boolean | 'indeterminate') => void-Event handler called when the checked state changes.
disabledboolean-When true, prevents the user from interacting with the checkbox.
requiredboolean-When true, indicates that the user must check the checkbox before the owning form can be submitted.
namestring-The name of the checkbox. Submitted with its owning form as part of a name/value pair.
valuestring-The value given as data for the checkbox when submitted in a form.