Home / File/ profile-form.tsx — ui Source File

profile-form.tsx — ui Source File

Architecture documentation for profile-form.tsx, a tsx file in the ui codebase. 11 imports, 0 dependents.

File tsx ComponentRegistry Styles 11 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  8d6f1cba_9692_d9ae_146c_bfcba6c637c7["profile-form.tsx"]
  ba3d44f3_7b34_f9cc_6283_44817785c0df["link"]
  8d6f1cba_9692_d9ae_146c_bfcba6c637c7 --> ba3d44f3_7b34_f9cc_6283_44817785c0df
  3d40a3bf_c062_4304_329a_00b1b72e8523["zod"]
  8d6f1cba_9692_d9ae_146c_bfcba6c637c7 --> 3d40a3bf_c062_4304_329a_00b1b72e8523
  6d65354d_8f59_2cfc_4783_24b2eb870bc4["react-hook-form"]
  8d6f1cba_9692_d9ae_146c_bfcba6c637c7 --> 6d65354d_8f59_2cfc_4783_24b2eb870bc4
  6802ce19_522d_e5fb_e458_8826d9f6952e["zod"]
  8d6f1cba_9692_d9ae_146c_bfcba6c637c7 --> 6802ce19_522d_e5fb_e458_8826d9f6952e
  79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"]
  8d6f1cba_9692_d9ae_146c_bfcba6c637c7 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81
  64d95022_f8e1_3e94_bb97_22b3ebca757e["use-toast"]
  8d6f1cba_9692_d9ae_146c_bfcba6c637c7 --> 64d95022_f8e1_3e94_bb97_22b3ebca757e
  aa2f3ec6_f291_3763_88ec_65a3f5ad5939["button"]
  8d6f1cba_9692_d9ae_146c_bfcba6c637c7 --> aa2f3ec6_f291_3763_88ec_65a3f5ad5939
  7a6b0be4_eca5_4970_1a93_79d670ef529e["form"]
  8d6f1cba_9692_d9ae_146c_bfcba6c637c7 --> 7a6b0be4_eca5_4970_1a93_79d670ef529e
  2de1d0e1_ab37_e1b0_4ef3_da8c8fa66107["input"]
  8d6f1cba_9692_d9ae_146c_bfcba6c637c7 --> 2de1d0e1_ab37_e1b0_4ef3_da8c8fa66107
  d493776b_8734_5d8d_382d_0f77f309a72b["select"]
  8d6f1cba_9692_d9ae_146c_bfcba6c637c7 --> d493776b_8734_5d8d_382d_0f77f309a72b
  11676f4c_1cc5_0c74_a596_96328025a3d7["textarea"]
  8d6f1cba_9692_d9ae_146c_bfcba6c637c7 --> 11676f4c_1cc5_0c74_a596_96328025a3d7
  style 8d6f1cba_9692_d9ae_146c_bfcba6c637c7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import Link from "next/link"
import { zodResolver } from "@hookform/resolvers/zod"
import { useFieldArray, useForm } from "react-hook-form"
import { z } from "zod"

import { cn } from "@/lib/utils"
import { toast } from "@/registry/new-york/hooks/use-toast"
import { Button } from "@/registry/new-york/ui/button"
import {
  Form,
  FormControl,
  FormDescription,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/registry/new-york/ui/form"
import { Input } from "@/registry/new-york/ui/input"
import {
  Select,
  SelectContent,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from "@/registry/new-york/ui/select"
import { Textarea } from "@/registry/new-york/ui/textarea"

const profileFormSchema = z.object({
  username: z
    .string()
    .min(2, {
      message: "Username must be at least 2 characters.",
    })
    .max(30, {
      message: "Username must not be longer than 30 characters.",
    }),
  email: z
    .string({
      required_error: "Please select an email to display.",
    })
    .email(),
  bio: z.string().max(160).min(4),
  urls: z
    .array(
      z.object({
        value: z.string().url({ message: "Please enter a valid URL." }),
      })
    )
    .optional(),
})

type ProfileFormValues = z.infer<typeof profileFormSchema>

// This can come from your database or API.
const defaultValues: Partial<ProfileFormValues> = {
  bio: "I own a computer.",
  urls: [
    { value: "https://shadcn.com" },
// ... (132 more lines)

Subdomains

Functions

Dependencies

  • button
  • form
  • input
  • link
  • react-hook-form
  • select
  • textarea
  • use-toast
  • utils
  • zod
  • zod

Frequently Asked Questions

What does profile-form.tsx do?
profile-form.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, Styles subdomain.
What functions are defined in profile-form.tsx?
profile-form.tsx defines 1 function(s): ProfileForm.
What does profile-form.tsx depend on?
profile-form.tsx imports 11 module(s): button, form, input, link, react-hook-form, select, textarea, use-toast, and 3 more.
Where is profile-form.tsx in the architecture?
profile-form.tsx is located at deprecated/www/app/(app)/examples/forms/profile-form.tsx (domain: ComponentRegistry, subdomain: Styles, directory: deprecated/www/app/(app)/examples/forms).

Analyze Your Own Codebase

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

Try Supermodel Free