{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "card", "title": "Card", "description": "A card container component with variants.", "dependencies": [ "class-variance-authority" ], "files": [ { "path": "registry/default/ui/card.tsx", "content": "import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\nimport { cva, VariantProps } from 'class-variance-authority';\n\nconst cardVariants = cva(\n [\n 'group/card relative rounded-lg bg-card text-card-foreground overflow-hidden border border-border',\n 'dark:before:-inset-px dark:before:absolute dark:before:pointer-events-none',\n ],\n {\n variants: {\n variant: {\n muted: 'bg-muted/30',\n },\n isDisabled: {\n true: 'opacity-70 blur-xs pointer-events-none select-none',\n },\n },\n defaultVariants: {\n isDisabled: false,\n },\n }\n);\n\ntype CardProps = React.HTMLAttributes &\n VariantProps;\n\nfunction Card({ className, variant, isDisabled, ...props }: CardProps) {\n return (\n \n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n \n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n \n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n \n );\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n \n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n \n );\n}\n\nconst cardFooterVariant = cva('flex border-t p-4 px-6 justify-start', {\n variants: {\n variant: {\n isInformative:\n 'items-center justify-between bg-muted text-muted-foreground overflow-hidden pb-3 pt-3',\n isDestructive:\n 'items-center justify-between bg-destructive/50 text-destructive-foreground overflow-hidden pb-3 pt-3',\n },\n },\n});\n\ntype CardFooterProps = React.HTMLAttributes &\n VariantProps;\n\nfunction CardFooter({ className, variant, ...props }: CardFooterProps) {\n return (\n \n );\n}\n\nexport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n};\n", "type": "registry:ui" } ], "type": "registry:ui" }