Empty
An empty state with a media slot, a title, a description and actions, revealed with a stagger and a layered hover motion.
Customize
Installation
npx shadcn@latest add @kinetic/emptyUsage
Compose EmptyHeader (media, title, description) and EmptyContent for actions.
import { FolderOpenIcon } from "@heroicons/react/24/outline";
import { Button } from "@/components/kinetic/ui/button";
import {
Empty,
EmptyContent,
EmptyDescription,
EmptyHeader,
EmptyMedia,
EmptyTitle,
} from "@/components/kinetic/ui/empty";
export function NoProjects() {
return (
<Empty>
<EmptyHeader>
<EmptyMedia variant="icon">
<FolderOpenIcon />
</EmptyMedia>
<EmptyTitle>No projects yet</EmptyTitle>
<EmptyDescription>Create your first project to get started.</EmptyDescription>
</EmptyHeader>
<EmptyContent>
<Button size="sm">New project</Button>
</EmptyContent>
</Empty>
);
}Media
EmptyMedia with variant="icon" draws a layered icon box. The default variant is a plain wrapper for images or illustrations.
<EmptyMedia>
<img src="/empty.svg" alt="" className="size-24" />
</EmptyMedia>Motion
animateOnMount plays the staggered reveal on first render, and hoverMotion fans the media layers apart on hover. Override hoverMotion per EmptyMedia.
<Empty animateOnMount={false} hoverMotion={false}>...</Empty>Motion preferences
Use blurPx and speed to tune the reveal. Reduced motion shows the content at once.
API Reference
Empty
Zero-dependency empty-state container orchestrating EmptyMedia reveal, staggered blur-fade content choreography, and layered hover motion.
| Prop | Type | Default | Description |
|---|---|---|---|
animateOnMount | boolean | true | Plays media entrance and staggered child reveal when mounted. |
hoverMotion | boolean | true | Enables the layered fan-out on mouse hover. |
blurPx | number | 4 | Blur radius in pixels applied during staggered reveal (clamped 0-16). |
speed | number | 1 | Speed multiplier shared by mount reveal, content stagger, and hover motion (clamped 0.25-4). |
EmptyMedia
Leading visual container supporting unstyled media or a layered 40x40 icon.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "icon" | "default" | Renders transparent wrapper or a layered 40x40 icon box when set to "icon". |
hoverMotion | boolean | - | Overrides the parent hover motion setting. |
EmptyHeader / EmptyTitle / EmptyDescription / EmptyContent
Centered header stack, heading, description block, and action area targeted by Empty stagger choreography.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | React.ComponentProps<"div"> | - | Forwards standard div attributes and spacing utilities. |