Empty
A simplified wrapper for Shadcn Empty with flexible option handling and automatic type conversion
No Messages
You haven't received any messages yet. When someone contacts you, they'll show up here.
Installation
npx shadcn@latest add @glrk-ui/emptyIf you haven't set up the prerequisites yet, check out registry setup.
Usage
Basic
import { Inbox } from "lucide-react"
import { EmptyWrapper } from "@/components/ui/empty"
import { Button } from "@/components/ui/button"
export function Basic() {
return (
<EmptyWrapper
title="No Messages"
description="You haven't received any messages yet. When someone contacts you, they'll show up here."
media={<Inbox className="size-10 text-muted-foreground" />}
content={<Button>Compose Message</Button>}
/>
)
}Custom Styling
import { EmptyWrapper } from "@/components/ui/empty";
import { AlertCircle } from "lucide-react";
export function CustomStyling() {
return (
<EmptyWrapper
media={<AlertCircle />}
mediaVariant="icon"
title="No results found"
description="Try adjusting your search or filter to find what you're looking for"
wrapperCls="border-2 bg-muted/50"
titleCls="text-destructive"
mediaCls="bg-destructive/10"
/>
)
}Reference
EmptyWrapper
Prop
Type