Empty
A placeholder component for empty states, showing an icon and a message.
Examples
import { Empty } from "@g4rcez/components";
function DefaultEmpty() {
return <Empty />;
}import { Empty } from "@g4rcez/components";
import { ArchiveIcon, UsersIcon } from "@phosphor-icons/react";
function CustomIcons() {
return (
<div className="flex flex-col gap-4">
<Empty Icon={ArchiveIcon} message="No archived items" />
<Empty Icon={UsersIcon} message="No team members yet" />
</div>
);
}import { Empty } from "@g4rcez/components";
function CustomMessage() {
return (
<Empty message="Your search returned no results. Try a different keyword." />
);
}When to use Empty
Use when
You need the documented Empty interaction or presentation in a product workflow.
Avoid when
A native HTML element already provides the Empty behavior you need.
Accessibility
Keep the Empty labeled and use its documented keyboard interaction. The component preserves visible focus and communicates state without relying on color alone.
- Keep keyboard focus visible and follow the documented key commands.
- Provide an accessible name and connect descriptions or errors to the control.