EmptyState
EmptyState(
props):Element
Defined in: packages/ui/src/components/empty-state.tsx:28
Permission-aware empty state placeholder.
Adapts its content based on the user’s permissions for the create action:
- Permitted: shows title, description, and a CTA button
- Forbidden: shows title and description without the CTA
- Invisible: shows a generic “Nothing here yet” message
- No createAction: shows title and description only
Parameters
Section titled “Parameters”See EmptyStateProps.
Returns
Section titled “Returns”Element
Example
Section titled “Example”<EmptyState title="No posts yet" description="Create your first blog post to get started." createAction={createPost.client} createLabel="New Post" icon={DocumentIcon}/>