Components
- Accordion
- Action BarUpdated
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- BadgeUpdated
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- CalendarUpdated
- CardUpdated
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context MenuUpdated
- Data List
- Date Picker
- DialogUpdated
- DrawerUpdated
- Editable
- FieldUpdated
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- MarqueeUpdated
- Menu
- Native Select
- Number InputUpdated
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- TableUpdated
- Tabs
- Textarea
- TimerUpdated
- ToastUpdated
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Hooks
You'll receive a notification when someone posts a comment
Installation#
pnpm dlx shadcn@latest add @shark/checkbox
Usage#
import { Checkbox } from "@/components/ui/checkbox";
<Checkbox />
Controlled#
Use the checked and onCheckedChange props to control the checkbox state programmatically.
❌
States#
Invalid#
Use the invalid prop to indicate an invalid state.
Disabled#
Use the disabled prop to disable the checkbox.
Examples#
With Description#
You'll receive a notification when someone posts a comment on your post
Indeterminate#
Group#
Select the items you want to show on the desktop.
Card Style#
API Reference#
Checkbox#
Checkbox control for boolean or multi-select state.
| Prop | Type | Default |
|---|---|---|
checked | boolean | 'indeterminate' | - |
defaultChecked | boolean | false |
disabled | boolean | false |
checked | boolean | 'indeterminate' | - |
onCheckedChange | ({ checked }: CheckedChangeDetails) => void | - |
className | string | - |
CheckboxGroup#
Groups related checkboxes with consistent layout.
| Prop | Type | Default |
|---|---|---|
value | string[] | - |
defaultValue | string[] | [] |
onValueChange | (details: ValueChangeDetails) => void | - |
className | string | - |
For a complete list of props, see the Ark UI documentation.