Components
A composable empty-state block for when there's no data to show — no results, no events, an empty folder, cleared filters. Ships Empty plus EmptyHeader, EmptyMedia (with a stacked 'icon' variant), EmptyTitle, EmptyDescription and EmptyContent, so you can drop in an icon or illustration, a title, supporting copy and call-to-action buttons. Dependency-free (just cva + cn).
Loading preview...
import { ArrowUpRightIcon } from "lucide-react";
import {
Empty,
EmptyContent,
EmptyDescription,
EmptyHeader,
EmptyTitle,
} from "@/components/ui/cnippet-empty";
export default function EmptyNoResults() {
return (
<div className="flex items-center justify-center">
<Empty className="bg-muted">
<EmptyHeader>
<EmptyTitle>No results found</EmptyTitle>
<EmptyDescription>
No results found for your search. Try adjusting your search terms.
</EmptyDescription>
</EmptyHeader>
<EmptyContent>
<button
className="inline-flex h-9 items-center justify-center gap-2 whitespace-nowrap rounded-lg bg-primary px-4 font-medium text-primary-foreground text-sm transition-colors hover:bg-primary/90"
type="button"
>
Try again
</button>
<a
className="inline-flex items-center gap-1 font-medium text-muted-foreground text-sm underline-offset-4 hover:underline [&_svg]:size-4"
href="#"
>
Learn more <ArrowUpRightIcon />
</a>
</EmptyContent>
</Empty>
</div>
);
}
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...