Skip to documentation

Design system / Molecules

Molecule / Feedback

EmptyStateCard

EmptyStateCard renders an icon, an h2 title and explanatory content. The caller determines the empty-state condition and recovery guidance. It does not distinguish loading, absent, filtered or unavailable data.

Live example

Live preview

Current component with fictional data. Example changes are not persisted.

No review rounds are open

Contact the Program or Edition Manager if you expect a round to be available.

Responsibility

Card parts, an icon and a fixed h2 form one empty-state presentation. ReviewAssignmentOverview composes this molecule within a feature-owned organism. A parent's taxonomy depends on its coordination responsibilities, not its children alone.

Public contract

The table describes supported inputs, exported parts and caller responsibilities. A callback supplies a command, such as saving a draft. These notes are maintained manually; check current source types before integration.

Maintained component API notes; current source is authoritative
Prop / partTypeRequirementResponsibility
iconReactNodeRequiredRendered inside the muted icon holder. Consumer decides icon meaning and accessibility.
titlestringRequiredRendered as an h2, not an optional heading-level prop.
childrenReactNodeRequiredExplanatory content in CardDescription. No dedicated action slot.

API notes are curated documentation, not generated types. The source linked above is the current implementation; update these notes alongside API changes.

State and behavior

Identify which values the caller controls and which behavior the component or underlying primitive owns. A local example does not supply persistence, authorization or a complete product lifecycle.

No client directive, state, behavior hook or request is defined in this file. Consumers own empty-state conditions, copy and any navigation. This presentation does not decide whether data is loading, absent, filtered or unavailable.

Dependencies

  • Card
  • CardContent
  • CardHeader
  • CardDescription
  • Consumer-supplied icon ReactNode

Token and styling contract

These notes identify theme roles, utilities and direct style values used by the source. Direct colors or timings are implementation exceptions, not recommendations to bypass the theme.

bg-muted/20 / bg-muted
Dashed card surface and icon-holder background.
text-muted-foreground
Icon holder and inherited CardDescription text.
text-title / text-supporting
Explicit heading and explanation type roles.
border-dashed, p-12, max-w-3xl, rounded-md
Source geometry; inherited Card uses card/card-foreground and border roles with local overrides.

Boundaries and limitations

  • No className, heading-level, loading, retry or dedicated action prop is exposed.
  • children is flexible content, but that does not establish a standardized action API. Use an appropriate surrounding composition if the empty state requires a workflow.
  • Empty-state classification follows responsibility, not the fact that it renders a Card. The card itself does not perform authorization or data loading.

Where to make a change

Change shared empty-state arrangement in empty-state-card.tsx; inherited Card or typography changes can propagate unless overridden. Change the condition, domain explanation and recovery action in the consumer. Changing the fixed h2 or children structure can affect heading order and existing content.

Selected real uses

ReviewAssignmentOverview

When no assignment is open, it shows a clock icon, No review rounds are open, and manager-contact guidance. Assignment sections may still appear below; this message does not mean there are no assignments at all.

src/components/reviews/reviewAssignmentOverview.tsx

These traces describe selected uses, not every dependency. Repository-only paths are shown as references; only approved files have public source views.

Usage contract

import { EmptyStateCard } from "@/components/ui/empty-state-card";
import { Clock3 } from "lucide-react";

<EmptyStateCard
  icon={<Clock3 className="size-5" aria-hidden />}
  title="No review rounds are open"
>
  You have review assignments, but no review rounds are currently open.
  Contact the Program or Edition Manager if you expect a round to be available.
</EmptyStateCard>

Illustrative consumer bindings, not a self-contained product workflow. Live examples supply only local state or explicit fictional props.

All molecules
Current components and theme tokens. Fictional example data. Source views refresh on deployment; authors maintain contract notes.