form-rhf-demo.tsx — ui Source File
Architecture documentation for form-rhf-demo.tsx, a tsx file in the ui codebase. 10 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 78f3407a_66bf_3823_3bc2_76ed3d88cec5["form-rhf-demo.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 78f3407a_66bf_3823_3bc2_76ed3d88cec5 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 3d40a3bf_c062_4304_329a_00b1b72e8523["zod"] 78f3407a_66bf_3823_3bc2_76ed3d88cec5 --> 3d40a3bf_c062_4304_329a_00b1b72e8523 6d65354d_8f59_2cfc_4783_24b2eb870bc4["react-hook-form"] 78f3407a_66bf_3823_3bc2_76ed3d88cec5 --> 6d65354d_8f59_2cfc_4783_24b2eb870bc4 e750d152_1191_1793_7244_99c7f9c595f4["sonner"] 78f3407a_66bf_3823_3bc2_76ed3d88cec5 --> e750d152_1191_1793_7244_99c7f9c595f4 6802ce19_522d_e5fb_e458_8826d9f6952e["zod"] 78f3407a_66bf_3823_3bc2_76ed3d88cec5 --> 6802ce19_522d_e5fb_e458_8826d9f6952e 57e86e45_ac6e_7278_be08_9092724e8401["button"] 78f3407a_66bf_3823_3bc2_76ed3d88cec5 --> 57e86e45_ac6e_7278_be08_9092724e8401 c6d6139d_ea69_3d79_5004_68419bae2ac0["card"] 78f3407a_66bf_3823_3bc2_76ed3d88cec5 --> c6d6139d_ea69_3d79_5004_68419bae2ac0 169af77a_46c3_8fec_4801_f34a0f1a3471["field"] 78f3407a_66bf_3823_3bc2_76ed3d88cec5 --> 169af77a_46c3_8fec_4801_f34a0f1a3471 80cf663d_a411_487c_d69e_ac9d405cd2ec["input"] 78f3407a_66bf_3823_3bc2_76ed3d88cec5 --> 80cf663d_a411_487c_d69e_ac9d405cd2ec 41df1c2c_a3b4_dc22_8bc9_310fe8b6ba9b["input-group"] 78f3407a_66bf_3823_3bc2_76ed3d88cec5 --> 41df1c2c_a3b4_dc22_8bc9_310fe8b6ba9b style 78f3407a_66bf_3823_3bc2_76ed3d88cec5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import { zodResolver } from "@hookform/resolvers/zod"
import { Controller, useForm } from "react-hook-form"
import { toast } from "sonner"
import * as z from "zod"
import { Button } from "@/registry/new-york-v4/ui/button"
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/registry/new-york-v4/ui/card"
import {
Field,
FieldDescription,
FieldError,
FieldGroup,
FieldLabel,
} from "@/registry/new-york-v4/ui/field"
import { Input } from "@/registry/new-york-v4/ui/input"
import {
InputGroup,
InputGroupAddon,
InputGroupText,
InputGroupTextarea,
} from "@/registry/new-york-v4/ui/input-group"
const formSchema = z.object({
title: z
.string()
.min(5, "Bug title must be at least 5 characters.")
.max(32, "Bug title must be at most 32 characters."),
description: z
.string()
.min(20, "Description must be at least 20 characters.")
.max(100, "Description must be at most 100 characters."),
})
export default function BugReportForm() {
const form = useForm<z.infer<typeof formSchema>>({
resolver: zodResolver(formSchema),
defaultValues: {
title: "",
description: "",
},
})
function onSubmit(data: z.infer<typeof formSchema>) {
toast("You submitted the following values:", {
description: (
<pre className="bg-code text-code-foreground mt-2 w-[320px] overflow-x-auto rounded-md p-4">
<code>{JSON.stringify(data, null, 2)}</code>
</pre>
),
position: "bottom-right",
// ... (91 more lines)
Domain
Subdomains
Functions
Dependencies
- button
- card
- field
- input
- input-group
- react
- react-hook-form
- sonner
- zod
- zod
Source
Frequently Asked Questions
What does form-rhf-demo.tsx do?
form-rhf-demo.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 form-rhf-demo.tsx?
form-rhf-demo.tsx defines 1 function(s): BugReportForm.
What does form-rhf-demo.tsx depend on?
form-rhf-demo.tsx imports 10 module(s): button, card, field, input, input-group, react, react-hook-form, sonner, and 2 more.
Where is form-rhf-demo.tsx in the architecture?
form-rhf-demo.tsx is located at apps/v4/registry/new-york-v4/examples/form-rhf-demo.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/new-york-v4/examples).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free