Home / Function/ CheckboxDemo() — ui Function Reference

CheckboxDemo() — ui Function Reference

Architecture documentation for the CheckboxDemo() function in checkbox-demo.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  2f7058bf_427f_22dd_96d6_e9a05784b576["CheckboxDemo()"]
  1387104f_bf36_38f6_7aa4_a0fcbad171ac["checkbox-demo.tsx"]
  2f7058bf_427f_22dd_96d6_e9a05784b576 -->|defined in| 1387104f_bf36_38f6_7aa4_a0fcbad171ac
  style 2f7058bf_427f_22dd_96d6_e9a05784b576 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/new-york-v4/examples/checkbox-demo.tsx lines 6–43

export default function CheckboxDemo() {
  return (
    <div className="flex flex-col gap-6">
      <div className="flex items-center gap-3">
        <Checkbox id="terms" />
        <Label htmlFor="terms">Accept terms and conditions</Label>
      </div>
      <div className="flex items-start gap-3">
        <Checkbox id="terms-2" defaultChecked />
        <div className="grid gap-2">
          <Label htmlFor="terms-2">Accept terms and conditions</Label>
          <p className="text-muted-foreground text-sm">
            By clicking this checkbox, you agree to the terms and conditions.
          </p>
        </div>
      </div>
      <div className="flex items-start gap-3">
        <Checkbox id="toggle" disabled />
        <Label htmlFor="toggle">Enable notifications</Label>
      </div>
      <Label className="hover:bg-accent/50 flex items-start gap-3 rounded-lg border p-3 has-[[aria-checked=true]]:border-blue-600 has-[[aria-checked=true]]:bg-blue-50 dark:has-[[aria-checked=true]]:border-blue-900 dark:has-[[aria-checked=true]]:bg-blue-950">
        <Checkbox
          id="toggle-2"
          defaultChecked
          className="data-[state=checked]:border-blue-600 data-[state=checked]:bg-blue-600 data-[state=checked]:text-white dark:data-[state=checked]:border-blue-700 dark:data-[state=checked]:bg-blue-700"
        />
        <div className="grid gap-1.5 font-normal">
          <p className="text-sm leading-none font-medium">
            Enable notifications
          </p>
          <p className="text-muted-foreground text-sm">
            You can enable or disable notifications at any time.
          </p>
        </div>
      </Label>
    </div>
  )
}

Subdomains

Frequently Asked Questions

What does CheckboxDemo() do?
CheckboxDemo() is a function in the ui codebase, defined in apps/v4/registry/new-york-v4/examples/checkbox-demo.tsx.
Where is CheckboxDemo() defined?
CheckboxDemo() is defined in apps/v4/registry/new-york-v4/examples/checkbox-demo.tsx at line 6.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free