snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
53
apps/v4/examples/aria/checkbox-demo.tsx
Normal file
53
apps/v4/examples/aria/checkbox-demo.tsx
Normal file
@@ -0,0 +1,53 @@
|
||||
"use client"
|
||||
|
||||
import { Checkbox } from "@/styles/aria-nova/ui/checkbox"
|
||||
import {
|
||||
Field,
|
||||
FieldContent,
|
||||
FieldDescription,
|
||||
FieldGroup,
|
||||
FieldLabel,
|
||||
FieldTitle,
|
||||
} from "@/styles/aria-nova/ui/field"
|
||||
import { Label } from "@/styles/aria-nova/ui/label"
|
||||
|
||||
export default function CheckboxDemo() {
|
||||
return (
|
||||
<FieldGroup className="max-w-sm">
|
||||
<Field orientation="horizontal">
|
||||
<Checkbox id="terms-checkbox" name="terms-checkbox" />
|
||||
<Label htmlFor="terms-checkbox">Accept terms and conditions</Label>
|
||||
</Field>
|
||||
<Field orientation="horizontal">
|
||||
<Checkbox
|
||||
id="terms-checkbox-2"
|
||||
name="terms-checkbox-2"
|
||||
defaultSelected
|
||||
/>
|
||||
<FieldContent>
|
||||
<FieldLabel htmlFor="terms-checkbox-2">
|
||||
Accept terms and conditions
|
||||
</FieldLabel>
|
||||
<FieldDescription>
|
||||
By clicking this checkbox, you agree to the terms.
|
||||
</FieldDescription>
|
||||
</FieldContent>
|
||||
</Field>
|
||||
<Field orientation="horizontal" data-disabled>
|
||||
<Checkbox id="toggle-checkbox" name="toggle-checkbox" isDisabled />
|
||||
<FieldLabel htmlFor="toggle-checkbox">Enable notifications</FieldLabel>
|
||||
</Field>
|
||||
<FieldLabel>
|
||||
<Field orientation="horizontal">
|
||||
<Checkbox id="toggle-checkbox-2" name="toggle-checkbox-2" />
|
||||
<FieldContent>
|
||||
<FieldTitle>Enable notifications</FieldTitle>
|
||||
<FieldDescription>
|
||||
You can enable or disable notifications at any time.
|
||||
</FieldDescription>
|
||||
</FieldContent>
|
||||
</Field>
|
||||
</FieldLabel>
|
||||
</FieldGroup>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user