{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "card", "title": "Card", "description": "Structured container with header, content, and footer sections for grouping related information.", "files": [ { "path": "packages/ui/src/card.tsx", "content": "\"use client\";\n\nimport type * as React from \"react\";\nimport { cn } from \"./utils\";\n\nexport interface CardProps extends React.ComponentProps<\"div\"> {\n /**\n * The size variant of the card\n * @default \"md\"\n */\n size?: \"md\" | \"sm\" | \"xs\";\n}\n\nexport const Card = ({\n className,\n size = \"md\",\n ref,\n ...props\n}: CardProps & React.RefAttributes) => (\n img:first-child]:pt-0 has-data-[slot=card-footer]:pb-0 data-[size=sm]:gap-4 data-[size=xs]:gap-3 data-[size=sm]:py-4 data-[size=xs]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 data-[size=xs]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl\",\n className\n )}\n data-size={size}\n data-slot=\"card\"\n ref={ref}\n {...props}\n />\n);\n\nCard.displayName = \"Card\";\n\nexport interface CardHeaderProps extends React.ComponentProps<\"div\"> {}\n\nexport const CardHeader = ({\n className,\n ref,\n ...props\n}: CardHeaderProps & React.RefAttributes) => (\n \n);\n\nCardHeader.displayName = \"CardHeader\";\n\nexport interface CardTitleProps extends React.ComponentProps<\"div\"> {}\n\nexport const CardTitle = ({\n className,\n ref,\n ...props\n}: CardTitleProps & React.RefAttributes) => (\n \n);\n\nCardTitle.displayName = \"CardTitle\";\n\nexport interface CardDescriptionProps extends React.ComponentProps<\"div\"> {}\n\nexport const CardDescription = ({\n className,\n ref,\n ...props\n}: CardDescriptionProps & React.RefAttributes) => (\n \n);\n\nCardDescription.displayName = \"CardDescription\";\n\nexport interface CardActionProps extends React.ComponentProps<\"div\"> {}\n\nexport const CardAction = ({\n className,\n ref,\n ...props\n}: CardActionProps & React.RefAttributes) => (\n \n);\n\nCardAction.displayName = \"CardAction\";\n\nexport interface CardContentProps extends React.ComponentProps<\"div\"> {}\n\nexport const CardContent = ({\n className,\n ref,\n ...props\n}: CardContentProps & React.RefAttributes) => (\n \n);\n\nCardContent.displayName = \"CardContent\";\n\nexport interface CardFooterProps extends React.ComponentProps<\"div\"> {}\n\nexport const CardFooter = ({\n className,\n ref,\n ...props\n}: CardFooterProps & React.RefAttributes) => (\n \n);\n\nCardFooter.displayName = \"CardFooter\";\n", "type": "registry:ui" } ], "type": "registry:ui" }