Installation
Complete project setup first. Your configuration
must select react/aria and include your Design System ID.
pnpm exec frontfriend download checkbox-field -f react --primitive ariaReview dependencies reported by the downloader and keep your source changes in version control.
Usage
import { CheckboxField } from "@/components/ui/checkbox-field";
import { Label } from "@/components/ui/label";
<CheckboxField position="prefix" disabled={false} className="">
<Label className="text-neutral-subtle">Urgent</Label>
</CheckboxField>; Examples
Default
import { CheckboxField } from "@/components/ui/checkbox-field";
import { Label } from "@/components/ui/label";
<CheckboxField position="prefix" disabled={false} className="">
<Label className="text-neutral-subtle">Urgent</Label>
</CheckboxField>; Suffix
import { CheckboxField } from "@/components/ui/checkbox-field";
import { Label } from "@/components/ui/label";
<CheckboxField position="suffix" disabled={false} className="">
<Label className="text-neutral-subtle">Urgent</Label>
</CheckboxField>; API reference
Frontfriend-owned props. Native HTML and inherited primitive props remain documented by React Aria.
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | — | |
disabled | boolean | false | |
onCheckedChange | (checked: boolean) => void | — | |
position | "prefix" | "suffix" | "prefix" |
Configuration determines the actual classes and available styling hooks. See Theming & component configuration before introducing a repeated local override.