Home / File/ checkbox-form-multiple.tsx — ui Source File

checkbox-form-multiple.tsx — ui Source File

Architecture documentation for checkbox-form-multiple.tsx, a tsx file in the ui codebase. 7 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 7 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  7d892346_f234_3a2b_c6d3_ddfa45e6949c["checkbox-form-multiple.tsx"]
  3d40a3bf_c062_4304_329a_00b1b72e8523["zod"]
  7d892346_f234_3a2b_c6d3_ddfa45e6949c --> 3d40a3bf_c062_4304_329a_00b1b72e8523
  6d65354d_8f59_2cfc_4783_24b2eb870bc4["react-hook-form"]
  7d892346_f234_3a2b_c6d3_ddfa45e6949c --> 6d65354d_8f59_2cfc_4783_24b2eb870bc4
  6802ce19_522d_e5fb_e458_8826d9f6952e["zod"]
  7d892346_f234_3a2b_c6d3_ddfa45e6949c --> 6802ce19_522d_e5fb_e458_8826d9f6952e
  64d95022_f8e1_3e94_bb97_22b3ebca757e["use-toast"]
  7d892346_f234_3a2b_c6d3_ddfa45e6949c --> 64d95022_f8e1_3e94_bb97_22b3ebca757e
  aa2f3ec6_f291_3763_88ec_65a3f5ad5939["button"]
  7d892346_f234_3a2b_c6d3_ddfa45e6949c --> aa2f3ec6_f291_3763_88ec_65a3f5ad5939
  fe882581_4266_6b26_b40f_462b3a19ebd0["checkbox"]
  7d892346_f234_3a2b_c6d3_ddfa45e6949c --> fe882581_4266_6b26_b40f_462b3a19ebd0
  7a6b0be4_eca5_4970_1a93_79d670ef529e["form"]
  7d892346_f234_3a2b_c6d3_ddfa45e6949c --> 7a6b0be4_eca5_4970_1a93_79d670ef529e
  style 7d892346_f234_3a2b_c6d3_ddfa45e6949c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import { z } from "zod"

import { toast } from "@/registry/new-york/hooks/use-toast"
import { Button } from "@/registry/new-york/ui/button"
import { Checkbox } from "@/registry/new-york/ui/checkbox"
import {
  Form,
  FormControl,
  FormDescription,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/registry/new-york/ui/form"

const items = [
  {
    id: "recents",
    label: "Recents",
  },
  {
    id: "home",
    label: "Home",
  },
  {
    id: "applications",
    label: "Applications",
  },
  {
    id: "desktop",
    label: "Desktop",
  },
  {
    id: "downloads",
    label: "Downloads",
  },
  {
    id: "documents",
    label: "Documents",
  },
] as const

const FormSchema = z.object({
  items: z.array(z.string()).refine((value) => value.some((item) => item), {
    message: "You have to select at least one item.",
  }),
})

export default function CheckboxReactHookFormMultiple() {
  const form = useForm<z.infer<typeof FormSchema>>({
    resolver: zodResolver(FormSchema),
    defaultValues: {
      items: ["recents", "home"],
    },
  })

// ... (68 more lines)

Subdomains

Dependencies

  • button
  • checkbox
  • form
  • react-hook-form
  • use-toast
  • zod
  • zod

Frequently Asked Questions

What does checkbox-form-multiple.tsx do?
checkbox-form-multiple.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in checkbox-form-multiple.tsx?
checkbox-form-multiple.tsx defines 1 function(s): CheckboxReactHookFormMultiple.
What does checkbox-form-multiple.tsx depend on?
checkbox-form-multiple.tsx imports 7 module(s): button, checkbox, form, react-hook-form, use-toast, zod, zod.
Where is checkbox-form-multiple.tsx in the architecture?
checkbox-form-multiple.tsx is located at deprecated/www/registry/new-york/examples/checkbox-form-multiple.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/new-york/examples).

Analyze Your Own Codebase

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

Try Supermodel Free