# Vendor SLA Scorecard block

> Vendor SLA scorecard grid with area sections, gap to target bars, trend lines and capped credits

Monthly vendor SLA review for outsourced fulfillment: every site's SLAs under area sections, 12 month gap bars and trend lines, credits capped pro rata, claims, cure notices. ReUI DataGrid, Filters, Frame. Vendor SLA, 3PL.

- Type: Pro block
- Category: [Advanced](https://reui.io/blocks/data-grid/advanced.md)
- Page: https://reui.io/blocks/data-grid/advanced/data-grid-advanced-31
- Docs (Base UI): https://reui.io/docs/components/base/data-grid.md
- Docs (Radix UI): https://reui.io/docs/components/radix/data-grid.md
- MCP: `get_block("data-grid-advanced-31")`
- Built with: Alert, Alert Dialog, Avatar, Badge, Button, Cascader, Chart, Data Grid, Dialog, Dropdown Menu, Empty, Field, Filters, Frame, Input, Input Group, Number Field, Popover, Radio Group, Select, Separator, Sheet, Skeleton, Switch, Table, Tabs, Textarea, Timeline, Toggle, Toggle Group, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://reui.io/docs/license-setup

## Best for

Vendor or 3PL SLAs read like a printed scorecard, area by area, each month's misses turned into capped credits, claims and cure notices

## Agent notes

- `SITES` and `METRICS` in data.ts hold the fees, at-risk shares and eight SLAs; `actualsOf` seeds 14 months, so load your results into `actuals`
- `readingsFor` in sla-math.ts scores a month: `targetAt`, `claimStateAt`, the pool cap, `streakAt`; retune `CLAIM_WINDOW_DAYS` and `CHRONIC_MISSES`
- `useSlaStore` changes only React state; send `createSla`, `updateSla`, `removeSlas`, `writeClaims`, `sendNotice` and `addNote` to your API

## When not to use

- Suppliers ranked by spend with OTIF on a peer band and a next buy call: use [Factory Scorecard](https://reui.io/blocks/data-grid/advanced/data-grid-advanced-11.md) (`get_block("data-grid-advanced-11")`)
- Internal KPIs scored against targets with typed actuals and thresholds: use [HR Scorecard](https://reui.io/blocks/data-grid/advanced/data-grid-advanced-13.md) (`get_block("data-grid-advanced-13")`)

## Third-party libraries

- Recharts v3: [API reference](https://recharts.github.io/en-US/api/), [docs](https://recharts.github.io/en-US/guide/getting-started/)
- 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)
- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/data-grid-advanced-31
```

## About Advanced blocks

### When to use

- Reporting tables whose rows carry in-cell bars, sparklines or heat cells beside the figures
- Performance reviews that weigh each record against a target, a plan or a prior period
- Review queues and record lists with create, edit, delete and undo, each row opening a tabbed sheet

### When not to use

- A rule builder on its own, to narrow a list or table you already have: use [Filters](https://reui.io/components/filters.md) (`get_component("filters")`)
- A plain sortable table of text cells, assembled from parts in your own layout: use [Data Grid](https://reui.io/components/data-grid.md) (`get_component("data-grid")`)
- Values typed into the cells themselves, with validation and a save or discard bar: use the [Editing blocks](https://reui.io/blocks/data-grid/editing.md)

### Agent notes

- Rows live in browser state, a store hook or a `useState`, so every create, edit and delete is lost on reload; back each write with your API
- Search, filters and sort run in the browser over every row before `useTable` sees them; move that query to your API at scale
- Each page.tsx wraps the block in a `min-h-svh` main with padding, a `max-w-7xl` width and an sr-only `h1`; drop that wrapper inside an app shell

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.
