Binhlaig UI Component
Checkbox
A compact control for selecting one or more options, with checked, unchecked and indeterminate states.
Installation
Install Checkbox in your project.
Terminal
npx binhlaig-ui@latest add checkboxFor project setup, installer selection, dependencies, and advanced installation instructions, see the Installation Guide.
View Installation Guide →Update or Overwrite →Import
Import Checkbox from your UI directory.
import { Checkbox } from "@/components/ui/checkbox"Usage
Wrap Checkbox and its text in a label for accessible naming.
States
Checkbox supports checked, unchecked, indeterminate and disabled states.
Controlled State
Control the checked state with React.
State:unchecked
Form Example
Use name and required for native form submission.
API Reference
Checkbox supports Base UI Root props and its three selection states.
| Prop | Values | Default |
|---|---|---|
checked | boolean | indeterminate | undefined |
defaultChecked | boolean | false |
onCheckedChange | function | — |
disabled | boolean | false |
required | boolean | false |
name | string | undefined |