Stat
KPI / metric の単独表示。label / value / desc に加え valueColor / trend / trendValue で色付け&方向矢印を制御。複数並べたい場合は wrapped=false にして <x-stat-group> で囲む。
最小
<x-stat label="Visits" value="1,234" />
+ desc
<x-stat label="Visits" value="1,234" desc="since last month" />
value に色
<x-stat label="null (default)" value="42.0K" desc="valueColor=null" />
<x-stat label="primary" value="42.0K" desc="valueColor=primary" valueColor="primary" />
<x-stat label="secondary" value="42.0K" desc="valueColor=secondary" valueColor="secondary" />
<x-stat label="accent" value="42.0K" desc="valueColor=accent" valueColor="accent" />
<x-stat label="info" value="42.0K" desc="valueColor=info" valueColor="info" />
<x-stat label="success" value="42.0K" desc="valueColor=success" valueColor="success" />
<x-stat label="warning" value="42.0K" desc="valueColor=warning" valueColor="warning" />
<x-stat label="error" value="42.0K" desc="valueColor=error" valueColor="error" />
trend (up=success ↑ / down=error ↓ / flat=灰 →)
<x-stat label="Signups" value="2,847" desc="vs last week" trend="up" trendValue="+12%" />
<x-stat label="Refunds" value="38" desc="vs last week" trend="down" trendValue="-3%" />
<x-stat label="Sessions" value="9,120" desc="vs last week" trend="flat" trendValue="0%" />
icon(figure に slot)
<x-stat label="Downloads" value="31K" desc="this month" valueColor="primary">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="inline-block h-8 w-8 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v2a2 2 0 002 2h12a2 2 0 002-2v-2M7 10l5 5 5-5M12 15V3"/></svg>
</x-stat>
<x-stat label="Likes" value="1.2K" desc="cumulative" valueColor="error">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="inline-block h-8 w-8 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.318 6.318a4.5 4.5 0 016.364 0L12 7.636l1.318-1.318a4.5 4.5 0 116.364 6.364L12 20.364l-7.682-7.682a4.5 4.5 0 010-6.364z"/></svg>
</x-stat>
<x-stat label="Verified" value="89%" desc="verification rate" valueColor="success" trend="up" trendValue="+2.1%">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="inline-block h-8 w-8 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
</x-stat>
複数並べる — x-stat-group で囲んで wrapped=false
<x-stat-group direction="responsive" class="w-full">
<x-stat :wrapped="false" label="Total Visits" value="89,400" desc="cumulative" valueColor="primary">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="inline-block h-8 w-8 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/></svg>
</x-stat>
<x-stat :wrapped="false" label="New Users" value="2,103" desc="new this month" valueColor="info" trend="up" trendValue="+18%">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="inline-block h-8 w-8 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"/></svg>
</x-stat>
<x-stat :wrapped="false" label="Revenue" value="1.2M" desc="MTD" valueColor="success" trend="up" trendValue="+4.7%">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="inline-block h-8 w-8 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
</x-stat>
</x-stat-group>