# Inventory Health block

> Inventory KPI summary card with period tabs and per-metric sparkline trends

Catalog health overview: Week/Month/Year tabs switch four inventory KPIs (in stock, out-of-stock, restock, slow movers), each with a recharts sparkline and tone-coded delta. ReUI Frame and Badge; shadcn Tabs, Chart, Button. Stats dashboard widget.

- Type: Pro block
- Category: [Sparkline](https://reui.io/blocks/chart/sparkline.md)
- Page: https://reui.io/blocks/chart/sparkline/chart-1
- MCP: `get_block("chart-1")`
- Built with: Badge, Button, Frame, Tabs
- Installs with a ReUI Pro or Ultimate license; setup: https://reui.io/docs/license-setup

## Best for

Catalog stock health in 4 divided cells whose values, sparklines and footer summary all swap on a Week, Month or Year tab

## Agent notes

- Replace `inventoryMetrics` and `inventorySummaries` in data.tsx, both keyed by `PeriodKey`; a new tab needs an entry in `PERIODS` and in both maps
- The Show full analytics `Button` in the `FrameFooter` has no handler; point it at your full inventory report
- `DotField` repaints its canvas only on resize or a class or style change on the root element, so a theme set by a data attribute leaves stale dots

## When not to use

- A static KPI grid with no period tabs or footer, each cell over a decorative area wedge: use [KPI Area Charts](https://reui.io/blocks/application/card/card-29.md) (`get_block("card-29")`)
- Separate 28 day tiles, each with a colored icon and its own hued area sparkline: use [KPI Trend Cards](https://reui.io/blocks/chart/sparkline/chart-15.md) (`get_block("chart-15")`)

## Install

```bash
npx shadcn@latest add @reui/chart-1
```

## About Sparkline blocks

### When to use

- Rows of metric tiles, each pairing its value with a sparkline, a meter or a delta
- Health strips for cron jobs, SLOs or data syncs that open with KPI tiles and mini trends
- Metric lists where every row ends in a small trend and a change badge

### When not to use

- Plain KPI numbers that need only a delta badge, an actions menu or a progress bar: use the [Stats blocks](https://reui.io/blocks/application/stats.md)
- One metric that deserves a full width plot with axes and a tooltip: use the [Area Chart blocks](https://reui.io/blocks/chart/area-chart.md)
- A whole overview page that sets a header, summary tiles and a work list around its plots: use the [Dashboard blocks](https://reui.io/blocks/application/dashboard.md)

### Agent notes

- `Chart` takes no props and fetches nothing: every tile value and series comes from constants in the block's own folder

Every ReUI item has a twin like this one; the index is https://reui.io/llms.txt. Agents with the ReUI MCP (https://reui.io/docs/mcp) get the same guidance from the getters named above.
