field.tsx — ui Source File
Architecture documentation for field.tsx, a tsx file in the ui codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 9e33818b_568d_f45e_d7d8_26dbc518cbe6["field.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 9e33818b_568d_f45e_d7d8_26dbc518cbe6 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 3d9438e8_7604_787c_4898_907262aff28b["utils"] 9e33818b_568d_f45e_d7d8_26dbc518cbe6 --> 3d9438e8_7604_787c_4898_907262aff28b 7ef314f6_7093_dcb4_c528_ee12b9a57e00["label"] 9e33818b_568d_f45e_d7d8_26dbc518cbe6 --> 7ef314f6_7093_dcb4_c528_ee12b9a57e00 d91f2d92_028d_f8a9_3acf_7be6f2a34921["separator"] 9e33818b_568d_f45e_d7d8_26dbc518cbe6 --> d91f2d92_028d_f8a9_3acf_7be6f2a34921 25383e8d_ca91_a50e_c3a8_5f228d02e1df["class-variance-authority"] 9e33818b_568d_f45e_d7d8_26dbc518cbe6 --> 25383e8d_ca91_a50e_c3a8_5f228d02e1df style 9e33818b_568d_f45e_d7d8_26dbc518cbe6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import { useMemo } from "react"
import { cn } from "@/examples/base/lib/utils"
import { Label } from "@/examples/base/ui-rtl/label"
import { Separator } from "@/examples/base/ui-rtl/separator"
import { cva, type VariantProps } from "class-variance-authority"
function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {
return (
<fieldset
data-slot="field-set"
className={cn(
"flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
className
)}
{...props}
/>
)
}
function FieldLegend({
className,
variant = "legend",
...props
}: React.ComponentProps<"legend"> & { variant?: "legend" | "label" }) {
return (
<legend
data-slot="field-legend"
data-variant={variant}
className={cn(
"mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
className
)}
{...props}
/>
)
}
function FieldGroup({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="field-group"
className={cn(
"group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
className
)}
{...props}
/>
)
}
const fieldVariants = cva(
"data-[invalid=true]:text-destructive gap-2 group/field flex w-full",
{
variants: {
orientation: {
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
horizontal:
"flex-row items-center *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
// ... (178 more lines)
Domain
Subdomains
Functions
Dependencies
- class-variance-authority
- label
- react
- separator
- utils
Source
Frequently Asked Questions
What does field.tsx do?
field.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, Changelog subdomain.
What functions are defined in field.tsx?
field.tsx defines 10 function(s): Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle.
What does field.tsx depend on?
field.tsx imports 5 module(s): class-variance-authority, label, react, separator, utils.
Where is field.tsx in the architecture?
field.tsx is located at apps/v4/examples/base/ui-rtl/field.tsx (domain: DocumentationAtlas, subdomain: Changelog, directory: apps/v4/examples/base/ui-rtl).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free