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
  eb1ea548_d494_a0ec_7b71_ccd8f584cb92["FieldLegend()"]
  2fdb221e_c552_bb16_cfe7_db746ae11988["field.tsx"]
  eb1ea548_d494_a0ec_7b71_ccd8f584cb92 -->|defined in| 2fdb221e_c552_bb16_cfe7_db746ae11988
  style eb1ea548_d494_a0ec_7b71_ccd8f584cb92 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/examples/radix/ui/field.tsx lines 22–38

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}
    />
  )
}

Subdomains

Frequently Asked Questions

What does FieldLegend() do?
FieldLegend() is a function in the ui codebase, defined in apps/v4/examples/radix/ui/field.tsx.
Where is FieldLegend() defined?
FieldLegend() is defined in apps/v4/examples/radix/ui/field.tsx at line 22.

Analyze Your Own Codebase

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

Try Supermodel Free