Skip to content

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

EmptyStateProps

See EmptyStateProps.

Element

<EmptyState
title="No posts yet"
description="Create your first blog post to get started."
createAction={createPost.client}
createLabel="New Post"
icon={DocumentIcon}
/>