appearance-form.tsx — ui Source File
Architecture documentation for appearance-form.tsx, a tsx file in the ui codebase. 9 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 220ca528_9632_c74c_ae61_0868a0708d8f["appearance-form.tsx"] 3d40a3bf_c062_4304_329a_00b1b72e8523["zod"] 220ca528_9632_c74c_ae61_0868a0708d8f --> 3d40a3bf_c062_4304_329a_00b1b72e8523 d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"] 220ca528_9632_c74c_ae61_0868a0708d8f --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3 6d65354d_8f59_2cfc_4783_24b2eb870bc4["react-hook-form"] 220ca528_9632_c74c_ae61_0868a0708d8f --> 6d65354d_8f59_2cfc_4783_24b2eb870bc4 6802ce19_522d_e5fb_e458_8826d9f6952e["zod"] 220ca528_9632_c74c_ae61_0868a0708d8f --> 6802ce19_522d_e5fb_e458_8826d9f6952e 79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"] 220ca528_9632_c74c_ae61_0868a0708d8f --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81 64d95022_f8e1_3e94_bb97_22b3ebca757e["use-toast"] 220ca528_9632_c74c_ae61_0868a0708d8f --> 64d95022_f8e1_3e94_bb97_22b3ebca757e aa2f3ec6_f291_3763_88ec_65a3f5ad5939["button"] 220ca528_9632_c74c_ae61_0868a0708d8f --> aa2f3ec6_f291_3763_88ec_65a3f5ad5939 7a6b0be4_eca5_4970_1a93_79d670ef529e["form"] 220ca528_9632_c74c_ae61_0868a0708d8f --> 7a6b0be4_eca5_4970_1a93_79d670ef529e e3816a69_e9ee_ea7d_ed26_21225e55c2ff["radio-group"] 220ca528_9632_c74c_ae61_0868a0708d8f --> e3816a69_e9ee_ea7d_ed26_21225e55c2ff style 220ca528_9632_c74c_ae61_0868a0708d8f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import { zodResolver } from "@hookform/resolvers/zod"
import { ChevronDown } from "lucide-react"
import { 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, buttonVariants } from "@/registry/new-york/ui/button"
import {
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
FormMessage,
} from "@/registry/new-york/ui/form"
import { RadioGroup, RadioGroupItem } from "@/registry/new-york/ui/radio-group"
const appearanceFormSchema = z.object({
theme: z.enum(["light", "dark"], {
required_error: "Please select a theme.",
}),
font: z.enum(["inter", "manrope", "system"], {
invalid_type_error: "Select a font",
required_error: "Please select a font.",
}),
})
type AppearanceFormValues = z.infer<typeof appearanceFormSchema>
// This can come from your database or API.
const defaultValues: Partial<AppearanceFormValues> = {
theme: "light",
}
export function AppearanceForm() {
const form = useForm<AppearanceFormValues>({
resolver: zodResolver(appearanceFormSchema),
defaultValues,
})
function onSubmit(data: AppearanceFormValues) {
toast({
title: "You submitted the following values:",
description: (
<pre className="mt-2 w-[340px] rounded-md bg-slate-950 p-4">
<code className="text-white">{JSON.stringify(data, null, 2)}</code>
</pre>
),
})
}
return (
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
<FormField
control={form.control}
// ... (105 more lines)
Domain
Subdomains
Functions
Types
Dependencies
- button
- form
- lucide-react
- radio-group
- react-hook-form
- use-toast
- utils
- zod
- zod
Source
Frequently Asked Questions
What does appearance-form.tsx do?
appearance-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 appearance-form.tsx?
appearance-form.tsx defines 1 function(s): AppearanceForm.
What does appearance-form.tsx depend on?
appearance-form.tsx imports 9 module(s): button, form, lucide-react, radio-group, react-hook-form, use-toast, utils, zod, and 1 more.
Where is appearance-form.tsx in the architecture?
appearance-form.tsx is located at deprecated/www/app/(app)/examples/forms/appearance/appearance-form.tsx (domain: ComponentRegistry, subdomain: Styles, directory: deprecated/www/app/(app)/examples/forms/appearance).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free