✨ Working with PDFs, images or videos? Discover 145+ free web apps built for everyday tasks

Empty State

A centered empty-state layout with icon, title, description, and optional action slot. Supports six variants: basic placeholder text, action-driven recovery, illustrative containers, grayscale avatar profiles, search/filter empty results, and error-state feedback with a retry action.

Loading preview...

Examples

Practical examples and common states for the same installable component.

Action

Includes a primary action button for recovery.

examples/empty-state-action.tsx
"use client";
import { EmptyState } from "@/components/wensity/empty-state";
import { IconPlus } from "@tabler/icons-react";
export function ActionEmptyState() {
return (
<EmptyState
icon={<IconPlus />}
title="No API tokens"
description="Create a token to authenticate with the Wensity CLI."
action={
<button type="button">
<IconPlus />
New token
</button>
}
/>
);
}

Illustration

Larger visual container for expressive empty states.

examples/empty-state-illustration.tsx
"use client";
import {
EmptyState,
EmptyStateIllustration,
} from "@/components/wensity/empty-state";
import { IconFileOff } from "@tabler/icons-react";
export function IllustrationEmptyState() {
return (
<EmptyState
icon={
<EmptyStateIllustration>
<IconFileOff />
</EmptyStateIllustration>
}
title="No files uploaded"
description="Drag and drop assets or browse from your device."
/>
);
}

Avatar

Black and white profile image for personal empty states.

examples/empty-state-avatar.tsx
"use client";
import { EmptyState } from "@/components/wensity/empty-state";
export function AvatarEmptyState() {
return (
<EmptyState
icon={
<div className="overflow-hidden rounded-full border-2">
<img
src="https://assets.wensity.com/avatars/1.webp"
alt=""
className="grayscale"
/>
</div>
}
title="No activity yet"
description="Parth has not pushed any commits this week."
/>
);
}

Error

Displays failed or unavailable content with a retry action.

examples/empty-state-error.tsx
"use client";
import { EmptyState } from "@/components/wensity/empty-state";
import { IconRefresh, IconServerOff } from "@tabler/icons-react";
export function ErrorEmptyState() {
return (
<EmptyState
icon={
<div className="rounded-full bg-red-500/10 text-red-500 dark:bg-red-500/15 dark:text-red-400">
<IconServerOff />
</div>
}
title="Failed to load workspace"
description="The server returned an unexpected error. Try again."
action={
<button type="button">
<IconRefresh />
Retry
</button>
}
/>
);
}