Dashboard widget

A flexible card for showing one data point and a path into the deeper view it summarizes. Used across CSM dashboards (Accounts, My Accounts), homeowner snapshots, and operations overviews.

Imported from @/components/dashboard-widget.

In context — My Accounts overview

The widget composed for the SmartAC CSM 'My Accounts' surface. Each tile summarizes a single signal and links into the queue or detail view that resolves it.

Anatomy

Header (label · icon · hint), a single value with optional unit and secondary, an optional delta pill, a viz slot, and a footer that links to the deeper destination.

Sizes

Spacing and value scale flex with `size`. Pick `sm` for tight grids and ribbons, `md` for standard dashboard tiles, `lg` for hero metrics.

Surfaces

The `surface` prop maps to the surface tokens. Use `default` on inset pages, `inset` when nested inside another card, `muted` for de-emphasized supporting metrics.

Visualizations

Pick the `viz` shape that matches the data: sparkline for trend, area for trend with magnitude, bars for periodic counts, progress for fill-of-target, distribution for share-of-whole, none for a numbers-only tile.

States

Default, loading, empty, error, locked. Each preserves the card's footprint so a grid of widgets doesn't reflow as data resolves.

Open alerts
42
+8
Triage
Open alerts
Open alerts
No alerts in the last 7 days
Open alerts
Couldn't load this metric
Predictive maintenance
Locked
Available on the Pro plan
Member NPS

Trends — flat, rising, declining

Three identical widgets, three different stories. Tone follows what's good for the metric, not the direction of the line.

Demos