// 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 {
Interactive playgroundConfigure Metric Card
Change any prop and inspect the server-rendered component immediately.
Live preview
<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"
/>
Live examplesDesigned for real product surfaces
Compare configurations and resize the browser to check responsive behavior.
<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"
/>
<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"
/>
<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 eventsEvents
Public events declared by this component. Custom events bubble from the component root and expose state through event.detail.
No public component events.
Component APIProps and configuration
All content and behavior shown above is supplied through these props and slots.
| Prop | Type | Default | Required |
|---|
label | string | "Metric" | No |
value | string | "0" | No |
description | string | "" | No |
icon | string | "" | No |
prefix | string | "" | No |
suffix | string | "" | No |
trend | string | "" | No |
trendLabel | string | "" | No |
trendDirection | string | "neutral" | No |
href | string | "" | No |
actionLabel | string | "" | No |
size | string | "default" | No |
color | string | "primary" | No |
variant | string | "default" | No |
align | string | "left" | No |
class | string | "" | No |
}
}