Checkbox
Example
"use client"
import { Checkbox } from "@databricks/appkit-ui/react"
export default function CheckboxExample() {
return (
<div className="flex items-center space-x-2">
<Checkbox id="terms" />
<label
htmlFor="terms"
className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
>
Accept terms and conditions
</label>
</div>
)
}
Checkbox
Source: packages/appkit-ui/src/react/ui/checkbox.tsx
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
checked | CheckedState | - | - | |
defaultChecked | CheckedState | - | - | |
required | boolean | - | - | |
onCheckedChange | ((checked: CheckedState) => void) | - | - | |
asChild | boolean | - | - |
Usage
import { Checkbox } from '@databricks/appkit-ui';
<Checkbox /* props */ />