Skip to content

Feature Request: Add an Empty component #2862

Description

@suxiaoshao

Description

Add a composable Empty component for empty results, missing content, first-use states, and other no-data presentations.

The component should follow the current shadcn/ui composition model instead of requiring each application to rebuild the same centered icon, title, description, and action layout.

Proposed parts

  • Empty
  • EmptyHeader
  • EmptyMedia with default and icon variants
  • EmptyTitle
  • EmptyDescription
  • EmptyContent

Actions and custom content should remain composable children.

Previous work

PR #2314 attempted an Empty component. It was closed without merging after a request to follow the shadcn style and later became inactive. Its implementation and screenshot may still be useful reference material.

Reference

Acceptance criteria

  • Stateless, composable component parts following existing GPUI builder patterns
  • Theme-token-based styling with no component-specific global theme fields
  • Story covering minimal, icon, action, search-result, and constrained-container examples
  • English documentation in website/docs/components/
  • Chinese documentation in website/zh-CN/docs/components/
  • Builder-pattern test

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions