Components / Core
EmptyState
Placeholder for an empty list or search: an icon, a title, a short explanation and an action.
import { EmptyState } from "@stylhero/ui";
Example
Code
import { Button, EmptyState, SearchIcon } from "@stylhero/ui";
function EmptyStateExample() {
return (
<EmptyState icon={<SearchIcon />} title="No builds yet" action={<Button>Start a build</Button>}>
Builds you save show up here.
</EmptyState>
);
}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
title required |
ReactNode |
- | |
action |
ReactNode |
- | Usually one primary Button that creates the first item. |
children |
ReactNode |
- | |
icon |
ReactNode |
- | A Lucide icon, e.g. <Users /> |
Also takes every <div> attribute (id, style, data-*, aria-*, event handlers…), passed to that element.
Generated from src/components/EmptyState.tsx. Something wrong or missing? Open an issue.