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
  506fed82_d4ef_c663_21e0_dbe8a6bda927["checkbox-form-multiple.tsx"]
  3d40a3bf_c062_4304_329a_00b1b72e8523["zod"]
  506fed82_d4ef_c663_21e0_dbe8a6bda927 --> 3d40a3bf_c062_4304_329a_00b1b72e8523
  6d65354d_8f59_2cfc_4783_24b2eb870bc4["react-hook-form"]
  506fed82_d4ef_c663_21e0_dbe8a6bda927 --> 6d65354d_8f59_2cfc_4783_24b2eb870bc4
  6802ce19_522d_e5fb_e458_8826d9f6952e["zod"]
  506fed82_d4ef_c663_21e0_dbe8a6bda927 --> 6802ce19_522d_e5fb_e458_8826d9f6952e
  1d9c6c27_a443_c5fd_35f3_e80b7125bc9f["use-toast"]
  506fed82_d4ef_c663_21e0_dbe8a6bda927 --> 1d9c6c27_a443_c5fd_35f3_e80b7125bc9f
  d418ad18_b947_f4e5_6e4c_01100d7a63e4["button"]
  506fed82_d4ef_c663_21e0_dbe8a6bda927 --> d418ad18_b947_f4e5_6e4c_01100d7a63e4
  77366ecd_665f_1a24_5286_cfd88309c336["checkbox"]
  506fed82_d4ef_c663_21e0_dbe8a6bda927 --> 77366ecd_665f_1a24_5286_cfd88309c336
  2f59b429_1e60_57e1_0581_cc5440e0bd30["form"]
  506fed82_d4ef_c663_21e0_dbe8a6bda927 --> 2f59b429_1e60_57e1_0581_cc5440e0bd30
  style 506fed82_d4ef_c663_21e0_dbe8a6bda927 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/default/hooks/use-toast"
import { Button } from "@/registry/default/ui/button"
import { Checkbox } from "@/registry/default/ui/checkbox"
import {
  Form,
  FormControl,
  FormDescription,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/registry/default/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/default/examples/checkbox-form-multiple.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/default/examples).

Analyze Your Own Codebase

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

Try Supermodel Free