Home / Function/ Card() — ui Function Reference

Card() — ui Function Reference

Architecture documentation for the Card() function in card.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  6a645dd2_a8b9_7016_fcad_8c4439eec904["Card()"]
  1791323c_24b3_71a6_f67e_dbdba3f606e3["card.tsx"]
  6a645dd2_a8b9_7016_fcad_8c4439eec904 -->|defined in| 1791323c_24b3_71a6_f67e_dbdba3f606e3
  style 6a645dd2_a8b9_7016_fcad_8c4439eec904 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/examples/radix/ui/card.tsx lines 4–20

function Card({
  className,
  size = "default",
  ...props
}: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {
  return (
    <div
      data-slot="card"
      data-size={size}
      className={cn(
        "ring-foreground/10 bg-card text-card-foreground group/card flex flex-col gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
        className
      )}
      {...props}
    />
  )
}

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free