Checkbox
FREECheckbox with an animated check, indeterminate state, and CheckboxField with label, description and card style.
Playground
Change the props and watch the component and its code update live.
Props
Code
import { CheckboxField } from "@/components/ui/checkbox";
<CheckboxField
label="Weekly digest"
description="New components every Monday."
/>Installation
Terminal
npx @bloxa/cli add checkbox
# or: npx shadcn@latest add @bloxa/checkboxPackages installed automatically: radix-ui
Examples
With label
Select all
The parent shows an indeterminate state while some children are checked.
Cards
API reference
Every component also accepts the props of the element it renders.
Checkbox
| Prop | Type | Default | Description |
|---|---|---|---|
| checked | boolean | "indeterminate" | — | Controlled state. |
| onCheckedChange | (checked) => void | — | Called when the state changes. |
CheckboxField
| Prop | Type | Default | Description |
|---|---|---|---|
| label | ReactNode | — | Clickable label. |
| description | ReactNode | — | Description under the label. |
| card | boolean | false | Renders the option as a card. |