videorc/ui

Empty

What a pane or a list says when there's nothing in it. Short muted text, centred, with an optional title and action, and no illustration, media tile or dashed box.

No recordings yet
Recordings you make in the Studio show up here.

Installation

$ pnpm dlx shadcn@latest add @videorc/empty

Usage

import {
  Empty,
  EmptyDescription,
  EmptyHeader,
  EmptyTitle,
} from "@/components/ui/empty";
<Empty>
  <EmptyHeader>
    <EmptyTitle>No recordings yet</EmptyTitle>
    <EmptyDescription>
      Recordings you make in the Studio show up here.
    </EmptyDescription>
  </EmptyHeader>
</Empty>

Anatomy

<Empty>
  <EmptyHeader>
    <EmptyTitle />
    <EmptyDescription />
  </EmptyHeader>
  <EmptyContent />
</Empty>

Examples

Description only

When a list is empty only because of a filter or a search, the description alone is enough. The pane or list it sits in sets the space around it.

No messages match these filters.

Theming

Token or attributeMeaning
text-sm, text-muted-foregroundThe description: 14 px secondary text
text-sm font-mediumThe title: 14 px at weight 500, never larger
gap-3, p-6The only spacing it brings; it has no radius or border of its own

Accessibility

EmptyTitle is a <div>. When the empty state is what the page is about, put a heading inside it (<EmptyTitle><h2>…</h2></EmptyTitle>). An action in EmptyContent is an ordinary button or link with its own name.

API reference

Every part takes every <div> prop. Unlike shadcn/ui's Empty there is no EmptyMedia: Videorc's empty states are words only.