Feedback
Empty State
Say what is empty, why, and the next step. One primary action.
Preview
No prospects yet
Describe your ideal customer and let AI find your first qualified prospects.
"use client";
import { Sparkles, Upload, Users } from "lucide-react";
import { Button } from "@/components/ui/button";
import { EmptyState } from "@/components/ui/empty-state";
export default function Example() {
return (
<EmptyState
icon={<Users />}
title="No prospects yet"
description="Describe your ideal customer and let AI find your first qualified prospects."
actions={
<>
<Button size="sm" leadingIcon={<Upload />}>Import CSV</Button>
<Button size="sm" variant="primary" leadingIcon={<Sparkles />}>Find prospects</Button>
</>
}
/>
);
}Installation
Components are copied into your project — no runtime package.
Create a
empty-state.tsxfile and paste the following code into it.src/components/ui/empty-state.tsximport type { ReactNode } from "react"; import { cx } from "@/utils/cx"; export interface EmptyStateProps { icon?: ReactNode; title: string; description?: string; /** Secondary + one primary action. */ actions?: ReactNode; className?: string; } /** Say what is empty, why, and the next step. One primary action. */ export function EmptyState({ icon, title, description, actions, className }: EmptyStateProps) { return ( <div className={cx("flex flex-col items-center px-6 py-10 text-center", className)}> {icon && ( <span className="mb-4 inline-flex size-10 items-center justify-center rounded-[10px] bg-surface text-fg-secondary shadow-button [&_svg]:size-4.5"> {icon} </span> )} <h3 className="text-lg font-medium text-fg">{title}</h3> {description && <p className="mt-1 max-w-xs text-base text-fg-secondary">{description}</p>} {actions && <div className="mt-5 flex items-center gap-2">{actions}</div>} </div> ); }Add the theme tokens and the
cxhelper from Installation if you haven’t yet, then update the import paths to match your project setup.