Home / Function/ FieldLegend() — ui Function Reference

FieldLegend() — ui Function Reference

Architecture documentation for the FieldLegend() function in field.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  0bc22629_3537_36dc_e8da_d2799e91ed6b["FieldLegend()"]
  56c854de_a6cd_224b_acad_3c45826d8f94["field.tsx"]
  0bc22629_3537_36dc_e8da_d2799e91ed6b -->|defined in| 56c854de_a6cd_224b_acad_3c45826d8f94
  style 0bc22629_3537_36dc_e8da_d2799e91ed6b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/new-york-v4/ui/field.tsx lines 24–42

function FieldLegend({
  className,
  variant = "legend",
  ...props
}: React.ComponentProps<"legend"> & { variant?: "legend" | "label" }) {
  return (
    <legend
      data-slot="field-legend"
      data-variant={variant}
      className={cn(
        "mb-3 font-medium",
        "data-[variant=legend]:text-base",
        "data-[variant=label]:text-sm",
        className
      )}
      {...props}
    />
  )
}

Subdomains

Frequently Asked Questions

What does FieldLegend() do?
FieldLegend() is a function in the ui codebase, defined in apps/v4/registry/new-york-v4/ui/field.tsx.
Where is FieldLegend() defined?
FieldLegend() is defined in apps/v4/registry/new-york-v4/ui/field.tsx at line 24.

Analyze Your Own Codebase

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

Try Supermodel Free