AsterUIDocsv1.0.2

Docs / Component reference

StatCard & StatGrid

Pair a metric with its change over time. A small chart can show the series behind the headline number.

Stat card example

Install

sh
npx @fierst/ui@1.0.2 add stat-card

Registry dependencies: theme, icon. Package dependencies: @lucide/icons.

Exports from ./ui/stat-card: StatCard, StatGrid.

Download the registry source for stat-card 1.0.2.

API contracts

ts
export function StatCard({
  label,
  value,
  delta,
  trend = 'neutral',
  description,
  icon,
  sparkline,
  class: extraClass,
}: {
  label: string;
  value: string | number;
  delta?: string;
  trend?: 'up' | 'down' | 'neutral';
  description?: string;
  icon?: LucideIconInput;
  sparkline?: readonly number[];
  class?: string;
})

export function StatGrid(props: { class?: string; children?: View })