Stats
stats shows numbers, titles and descriptions side by side — dashboard
material. Each stat can carry actions and a figure.
Stats
Downloads
1,234
Users this month
Orders
456
20 pending
Revenue
$8,432
+12% vs last month
<DStats>
<DStat Title="Downloads" Value="@("1,234")" Desc="Users this month" />
<DStat Title="Orders" Value="@("456")" Desc="20 pending" />
<DStat Title="Revenue" Value="@("$8,432")" Desc="+12% vs last month" />
</DStats>Vertical— stats-vertical, e.g. for narrow columns
Downloads
1,234
Users this month
Orders
456
20 pending
<DStats Orientation="DaisyOrientation.Vertical" Class="w-64">
<DStat Title="Downloads" Value="@("1,234")" Desc="Users this month" />
<DStat Title="Orders" Value="@("456")" Desc="20 pending" />
</DStats>Figure & actions
Albums
250
21 incoming invitations
Tracks
2,350
Live
<DStats Class="bg-base-200 rounded-box shadow">
<DStat Title="Albums" Value="250">
<Actions>
<button class="btn btn-xs btn-primary">Albums</button>
<button class="btn btn-xs btn-ghost">Artists</button>
</Actions>
<Figure>
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 opacity-60" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19V6l12-3v13M9 19c0 1.1-1.34 2-3 2s-3-.9-3-2 1.34-2 3-2 3 .9 3 2m12-3c0 1.1-1.34 2-3 2s-3-.9-3-2 1.34-2 3-2 3 .9 3 2" />
</svg>
</Figure>
<ChildContent>
<div class="stat-desc">21 incoming invitations</div>
</ChildContent>
</DStat>
<DStat Title="Tracks" Value="@("2,350")">
<Figure>
<DBadge Color="DaisyColor.Success">Live</DBadge>
</Figure>
</DStat>
</DStats>Inside a card
This week
Steps
12.4k
Sleep
7h 12m
Burn
2,354 kcal
<div class="card bg-base-200 w-96 shadow">
<div class="card-body">
<h2 class="card-title">This week</h2>
<DStats Orientation="DaisyOrientation.Horizontal">
<DStat Title="Steps" Value="@("12.4k")" />
<DStat Title="Sleep" Value="@("7h 12m")" />
<DStat Title="Burn" Value="@("2,354 kcal")" />
</DStats>
</div>
</div>API
DStats
Parameters
| Name | Type | Default | Binding | Description |
|---|---|---|---|---|
| Orientation | DaisyOrientation | Auto | — | Grid direction of the stats group. AutoVerticalHorizontal |
| ChildContent | RenderFragment | — | — | The DStat items. |
| Class | string | — | — | Additional CSS classes appended to the component's computed daisyUI classes. |
| Style | string | — | — | Inline styles applied to the root element. |
DStat
Parameters
| Name | Type | Default | Binding | Description |
|---|---|---|---|---|
| Title | string | — | — | Small uppercase label above the value ( stat-title ). |
| Value | object | — | — | The main number/text ( stat-value ). |
| Desc | string | — | — | Description below the value ( stat-desc ). |
| Actions | RenderFragment | — | — | Buttons rendered above the title ( stat-actions ). |
| Figure | RenderFragment | — | — | Icon/secondary content aligned to the side ( stat-figure ). |
| ChildContent | RenderFragment | — | — | Extra raw content appended to the stat. |
| Class | string | — | — | Additional CSS classes appended to the component's computed daisyUI classes. |
| Style | string | — | — | Inline styles applied to the root element. |
DBadge
Parameters
| Name | Type | Default | Binding | Description |
|---|---|---|---|---|
| Color | DaisyColor | Default | — | Contextual color (e.g. badge-primary , badge-ghost ); Default emits no class. DefaultPrimarySecondaryAccentInfoSuccessWarningErrorGhostNeutral |
| Variant | DaisyVariant | Default | — | Style variant (e.g. badge-outline ); Default emits no class. DefaultOutlineDashSoftLink |
| Size | DaisySize | Medium | — | Size (e.g. badge-xs , badge-lg ); Medium emits no class. ExtraSmallSmallMediumLargeExtraLarge |
| Shape | DaisyShape | Default | — | Corner shape ( badge-circle , badge-rect ); Default emits no class. DefaultCircleRect |
| IconStart | DaisyIcon | — | — | Icon rendered before the badge content. |
| IconEnd | DaisyIcon | — | — | Icon rendered after the badge content. |
| IconSize | DaisySize? | — | — | Icon size; defaults to the badge Size when null . ExtraSmallSmallMediumLargeExtraLarge |
| ChildContent | RenderFragment | — | — | The badge's inner text and content. |
| Class | string | — | — | Additional CSS classes appended to the component's computed daisyUI classes. |
| Style | string | — | — | Inline styles applied to the root element. |