# Stock Health block

> Stock Health Grid

Inventory overview block: total asset value KPI + segmented stock health bar (in stock / low / out of stock) above a filterable product DataGrid with search, date range, category and supplier filters, row selection, and pagination.

- Type: Pro block
- Category: [Inventory](https://web.dev.reui.io/blocks/solutions/inventory.md)
- Page: https://web.dev.reui.io/blocks/solutions/inventory/solution-inventory-6
- MCP: `get_block("solution-inventory-6")`
- Built with: Badge, Button, Calendar, Card, Data Grid, Dropdown Menu, Frame, Input Group, Popover, Select, Separator, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

On hand, inbound and outbound counts per row with tooltips, a signed delta badge, supplier logo tiles and category and supplier filters

## Agent notes

- `PRODUCTS` and `inventorySummary` in data.ts are sample data; `StatsHeader` draws the asset value and health bar from the latter
- `dateRange` in `InventoryDataGrid` is local state that never filters `PRODUCTS`; only search, category and supplier do
- The Stock Planner button in `InventoryDataGrid` and the row menu items in `productColumns` have no handler

## When not to use

- Filter rules built field by field with an operator and a value for each: use [Billing Transactions](https://web.dev.reui.io/blocks/data-grid/filtering/data-grid-filtering-1.md) (`get_block("data-grid-filtering-1")`)
- Rows that are fetched, sorted and paged on the server: use [Data Grid](https://web.dev.reui.io/components/data-grid.md) (`get_component("data-grid")`)

## Third-party libraries

- TanStack Table v9: [API reference](https://tanstack.com/table/v9/docs/framework/react/reference/index), [docs](https://tanstack.com/table/v9/docs/framework/react/quick-start)
- date-fns v4: [docs](https://date-fns.org/v4.1.0/docs/Getting-Started)
- React DayPicker v9: [API reference](https://daypicker.dev/v9/api), [docs](https://daypicker.dev/v9/start)

## Install

```bash
npx shadcn@latest add @reui/solution-inventory-6
```

## About Inventory blocks

### When to use

- Stock overview and ledger pages: KPI tiles, a stock health bar and a filterable SKU table
- A low stock reorder queue, or a purchase order received line by line from its supplier
- Product and order overlays: stock rules, variants and photos, order review, tracking or a shipping label

### When not to use

- A team overview of KPI tiles and charts where nothing tracks stock or SKUs: use the [Dashboard blocks](https://web.dev.reui.io/blocks/application/dashboard.md)
- A side panel for a record other than a product, order or shipment: use the [Sheet blocks](https://web.dev.reui.io/blocks/application/sheet.md)
- An activity or event history on its own, with no stock or shipment around it: use the [Timeline blocks](https://web.dev.reui.io/blocks/application/timeline.md)

### Agent notes

- Every block sets a `min-h-svh` wrapper with its own padding in page.tsx or its root component; drop it when the block mounts inside your app layout
- No block fetches or saves anything: actions set local state, fire a sonner `toast`, link to a page anchor or have no handler, so wire each to your API

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