Skip to Content

Data Display Components

Reuse Puzzle Pieces stat, timeline, progress, comparison, and empty-state compositions.

Data display compositions present application-provided values without owning data fetching, formatting, or business rules. Shared dashboard patterns are re-exported here rather than implemented twice.

Beta API maturity: Beta. These compositions are new and may evolve based on feedback.

Installation

import {
  ActivityTimeline,
  EmptyStatePanel,
  MetricComparison,
  ProgressOverview,
  StatCard,
  StatGroup,
} from "@puzzle-ui/pieces";

StatCard, StatGroup, ActivityTimeline, and ProgressOverview are aliases of DashboardStatCard, DashboardStatGroup, DashboardActivityFeed, and DashboardProgressCard. Their APIs and behavior are identical.

Metric comparison

Use definition-list semantics to compare related values:

390 × 844

Empty state

An empty state can include an illustration and a caller-provided action. Keep the action appropriate to the empty resource and preserve the surrounding page context.

390 × 844

Accessibility and responsive behavior

  • Comparison values use a definition list with explicit labels.
  • Empty states use a labelled section and heading; provide useful action names.
  • Activity timelines and progress indicators retain the native semantics documented on the Dashboard page.
  • Grid and comparison layouts adapt at narrow widths and use Puzzle theme tokens.

API

ComponentProps
StatCardSame as DashboardStatCard: label, value, description, icon, trend, action, loading, className
StatGroupSame as DashboardStatGroup: children, label, columns, className
ActivityTimelineSame as DashboardActivityFeed: items, title, emptyState, renderItem, className
ProgressOverviewSame as DashboardProgressCard: title, value, description, status, action, className
MetricComparisontitle, primaryLabel, primaryValue, comparisonLabel, comparisonValue (required), description, className
EmptyStatePaneltitle (required), description, illustration, action, className