// Generated by scripts/generate-showcase.mjs. Do not edit directly. page MetricCardDetail { layout = "showcase" state playground_label = ctx.url.searchParams.get("pg_label") ?? "Metric Card" state playground_value = ctx.url.searchParams.get("pg_value") ?? "sample-1" state playground_description = ctx.url.searchParams.get("pg_description") ?? "A polished default metric card for a modern application." state playground_icon = ctx.url.searchParams.get("pg_icon") ?? "" state playground_prefix = ctx.url.searchParams.get("pg_prefix") ?? "" state playground_suffix = ctx.url.searchParams.get("pg_suffix") ?? "" state playground_trend = ctx.url.searchParams.get("pg_trend") ?? "" state playground_trendLabel = ctx.url.searchParams.get("pg_trendLabel") ?? "Metric Card" state playground_trendDirection = ctx.url.searchParams.get("pg_trendDirection") ?? "neutral" state playground_href = ctx.url.searchParams.get("pg_href") ?? "#metric-card-demo" state playground_actionLabel = ctx.url.searchParams.get("pg_actionLabel") ?? "Metric Card" state playground_size = ctx.url.searchParams.get("pg_size") ?? "default" state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary" state playground_variant = ctx.url.searchParams.get("pg_variant") ?? "default" state playground_align = ctx.url.searchParams.get("pg_align") ?? "start" state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1" seo { title = "Metric Card" description = "Single statistic or operational metric with icon, trend, and optional action." } view {
Blocks component

Metric Card

Single statistic or operational metric with icon, trend, and optional action.

16 props0 slots0 eventsTheme readyResponsive
Interactive playground

Configure Metric Card

Change any prop and inspect the server-rendered component immediately.

Live preview
Component code
<MetricCard
  label="Metric Card"
  value="sample-1"
  description="A polished default metric card for a modern application."
  trendLabel="Metric Card"
  href="#metric-card-demo"
  actionLabel="Metric Card"
  align="start"
/>
Component props16 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Recommended

Production default

Balanced spacing, hierarchy, and content for the most common product workflow.

01
Live preview
Component usage.wrn
<MetricCard
  label="Metric Card"
  value="sample-1"
  description="A polished default metric card for a modern application."
  trendLabel="Metric Card"
  href="#metric-card-demo"
  actionLabel="Metric Card"
  align="start"
/>
Dense UI

Compact application

A tighter variation for dashboards, side panels, tables, and operational interfaces.

02
Live preview
Component usage.wrn
<MetricCard
  label="Compact example"
  value="sample-2"
  description="A compact configuration for dashboards and dense product surfaces."
  icon="icon-[lucide--arrow-right]"
  trendLabel="Compact example"
  href="#metric-card-demo"
  actionLabel="Compact example"
  size="sm"
  variant="secondary"
  align="center"
/>
Extended

Rich configuration

A more expressive variation using additional data, stronger emphasis, and optional states.

03
Live preview
Component usage.wrn
<MetricCard
  label="Advanced example"
  value="sample-3"
  description="A richer configuration demonstrating additional content and hierarchy."
  icon="icon-[lucide--trash-2]"
  trendLabel="Advanced example"
  href="#metric-card-demo"
  actionLabel="Advanced example"
  size="lg"
  variant="success"
  align="end"
/>
Component events

Events

Public events declared by this component. Custom events bubble from the component root and expose state through event.detail.

No public component events.
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
labelstring"Metric"No
valuestring"0"No
descriptionstring""No
iconstring""No
prefixstring""No
suffixstring""No
trendstring""No
trendLabelstring""No
trendDirectionstring"neutral"No
hrefstring""No
actionLabelstring""No
sizestring"default"No
colorstring"primary"No
variantstring"default"No
alignstring"left"No
classstring""No
} }