{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "empty", "title": "Empty", "description": "Empty state placeholder with icon and message for when no content is available.", "dependencies": [ "class-variance-authority" ], "files": [ { "path": "packages/ui/src/empty.tsx", "content": "import { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"./utils\";\n\n// ---------------------------------------------------------------------------\n// Empty\n// ---------------------------------------------------------------------------\n\nexport interface EmptyProps extends React.ComponentProps<\"div\"> {}\n\nconst Empty = ({\n className,\n ref,\n ...props\n}: EmptyProps & React.RefAttributes) => (\n \n);\n\nEmpty.displayName = \"Empty\";\n\n// ---------------------------------------------------------------------------\n// EmptyHeader\n// ---------------------------------------------------------------------------\n\nexport interface EmptyHeaderProps extends React.ComponentProps<\"div\"> {}\n\nconst EmptyHeader = ({\n className,\n ref,\n ...props\n}: EmptyHeaderProps & React.RefAttributes) => (\n \n);\n\nEmptyHeader.displayName = \"EmptyHeader\";\n\n// ---------------------------------------------------------------------------\n// EmptyMedia\n// ---------------------------------------------------------------------------\n\nconst emptyMediaVariants = cva(\n \"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n icon: \"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\ntype EmptyMediaVariantsProps = VariantProps;\n\nexport interface EmptyMediaProps\n extends React.ComponentProps<\"div\">,\n EmptyMediaVariantsProps {}\n\nconst EmptyMedia = ({\n className,\n variant = \"default\",\n ref,\n ...props\n}: EmptyMediaProps & React.RefAttributes) => (\n \n);\n\nEmptyMedia.displayName = \"EmptyMedia\";\n\n// ---------------------------------------------------------------------------\n// EmptyTitle\n// ---------------------------------------------------------------------------\n\nexport interface EmptyTitleProps extends React.ComponentProps<\"div\"> {}\n\nconst EmptyTitle = ({\n className,\n ref,\n ...props\n}: EmptyTitleProps & React.RefAttributes) => (\n \n);\n\nEmptyTitle.displayName = \"EmptyTitle\";\n\n// ---------------------------------------------------------------------------\n// EmptyDescription\n// ---------------------------------------------------------------------------\n\nexport interface EmptyDescriptionProps extends React.ComponentProps<\"div\"> {}\n\nconst EmptyDescription = ({\n className,\n ref,\n ...props\n}: EmptyDescriptionProps & React.RefAttributes) => (\n a]:underline [&>a]:underline-offset-4 [&>a]:hover:text-primary\",\n className\n )}\n data-slot=\"empty-description\"\n ref={ref}\n {...props}\n />\n);\n\nEmptyDescription.displayName = \"EmptyDescription\";\n\n// ---------------------------------------------------------------------------\n// EmptyContent\n// ---------------------------------------------------------------------------\n\nexport interface EmptyContentProps extends React.ComponentProps<\"div\"> {}\n\nconst EmptyContent = ({\n className,\n ref,\n ...props\n}: EmptyContentProps & React.RefAttributes) => (\n \n);\n\nEmptyContent.displayName = \"EmptyContent\";\n\n// ---------------------------------------------------------------------------\n// Exports\n// ---------------------------------------------------------------------------\n\nexport {\n Empty,\n EmptyContent,\n EmptyDescription,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n emptyMediaVariants,\n};\n", "type": "registry:ui" } ], "type": "registry:ui" }