Components/StatCard
Universal Component

StatCard

Component documentation for StatCard.

This page was migrated by AI, please review carefully

Migration is complete, but please validate against source code and manual review.

StatCard

Component documentation for StatCard.

Basic Usage

Default Variant

Base card layout without trend/progress enhancement.

Demo loads on client.

Insight Variant

Shows trend/compare information by passing the insight object.

Demo loads on client.

Progress Variant

Switches to progress layout and supports shuffle updates.

Demo loads on client.

API

Props

PropTypeDefaultDescription
valuenumber | string-DisplayValue
labelstring-Description for label.
iconClassstring''Icon class (UnoCSS Icones).
clickablebooleanfalseEnables hover/press states.
insightStatCardInsight-Change indicator object (moves label to top).
variantStatCardVariant'default'Layout variant (default | progress).
progressnumber-Progress percent (0-100). Passing this enables the progress variant.
metastring-Bottom meta line for progress variant.

StatCardInsight

FieldTypeDefaultDescription
fromnumber-Baseline value.
tonumber-Current value.
type'percent' | 'delta''percent'Percent change or absolute delta.
color'success' | 'danger' | 'warning' | 'info' | string-Overrides indicator color.
iconClassstring-Custom indicator icon.
suffixstring-Overrides suffix (default % for percent).
precisionnumber-Decimal precision.

Slots

SlotDescription
valueCustom value area.
labelCustom label area.
metaMeta line for progress variant.
Was this helpful?