empty.tsx — ui Source File
Architecture documentation for empty.tsx, a tsx file in the ui codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 09ae1024_fb5e_c215_d082_a4509ccede95["empty.tsx"] 25383e8d_ca91_a50e_c3a8_5f228d02e1df["class-variance-authority"] 09ae1024_fb5e_c215_d082_a4509ccede95 --> 25383e8d_ca91_a50e_c3a8_5f228d02e1df 79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"] 09ae1024_fb5e_c215_d082_a4509ccede95 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81 style 09ae1024_fb5e_c215_d082_a4509ccede95 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"
function Empty({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="empty"
className={cn(
"flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance rounded-lg border-dashed p-6 text-center md:p-12",
className
)}
{...props}
/>
)
}
function EmptyHeader({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="empty-header"
className={cn(
"flex max-w-sm flex-col items-center gap-2 text-center",
className
)}
{...props}
/>
)
}
const emptyMediaVariants = cva(
"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
{
variants: {
variant: {
default: "bg-transparent",
icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6",
},
},
defaultVariants: {
variant: "default",
},
}
)
function EmptyMedia({
className,
variant = "default",
...props
}: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>) {
return (
<div
data-slot="empty-icon"
data-variant={variant}
className={cn(emptyMediaVariants({ variant, className }))}
{...props}
/>
)
}
function EmptyTitle({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="empty-title"
className={cn("text-lg font-medium tracking-tight", className)}
{...props}
/>
)
}
function EmptyDescription({ className, ...props }: React.ComponentProps<"p">) {
return (
<div
data-slot="empty-description"
className={cn(
"text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",
className
)}
{...props}
/>
)
}
function EmptyContent({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="empty-content"
className={cn(
"flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm",
className
)}
{...props}
/>
)
}
export {
Empty,
EmptyHeader,
EmptyTitle,
EmptyDescription,
EmptyContent,
EmptyMedia,
}
Domain
Subdomains
Dependencies
- class-variance-authority
- utils
Source
Frequently Asked Questions
What does empty.tsx do?
empty.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in empty.tsx?
empty.tsx defines 6 function(s): Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle.
What does empty.tsx depend on?
empty.tsx imports 2 module(s): class-variance-authority, utils.
Where is empty.tsx in the architecture?
empty.tsx is located at deprecated/www/registry/new-york/ui/empty.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/new-york/ui).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free