# Campaign Target Review block

> Campaign target grid with diverging ROAS and CPA bars, channel-grouped rows and a column filter row

Paid media target review for 30 campaigns: ROAS and CPA each show target, tinted actual and a bar splitting misses from beats at one zero line. Verdict chips, range filters, 5-tab sheet, undo. ReUI DataGrid, Cascader; shadcn Sheet, Slider. PPC.

- Type: Pro block
- Category: [Advanced](https://reui.io/blocks/data-grid/advanced.md)
- Page: https://reui.io/blocks/data-grid/advanced/data-grid-advanced-3
- 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-3")`
- Built with: Alert, Alert Dialog, Avatar, Badge, Button, Cascader, Code Block, Data Grid, Dropdown Menu, Empty, Field, Frame, Icon Tile, Input, Input Group, Item, Kbd, Popover, Progress, Select, Separator, Sheet, Slider, Switch, Tabs, Toggle, Toggle Group, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://reui.io/docs/license-setup

## Best for

Campaigns judged on ROAS and CPA against their own targets, with funnel stage tabs, verdict chips, a target change history and CSV export

## Agent notes

- `CAMPAIGNS`, `TARGET_REVISIONS` and `OWNERS` are sample data; the form and filter pickers also read `CHANNEL_ORDER` and `COUNTRY_ORDER`
- A saved target or budget edit appends a `TargetRevision` with `at` and `byId` null, so the Changes tab shows You and Just now
- `DELTA_LIMIT` sets one 40% scale for the ROAS and CPA bars; a gap past it holds a full half track, so rescale it for your spread

## When not to use

- A column set that grows on demand from a drill-down picker of related fields: use [Company Attributes](https://reui.io/blocks/data-grid/columns/data-grid-columns-5.md) (`get_block("data-grid-columns-5")`)
- Campaign trends over time drawn as sparklines inside the cells: use [Ad Campaign Performance](https://reui.io/blocks/data-grid/advanced/data-grid-advanced-1.md) (`get_block("data-grid-advanced-1")`)

## Install

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

## 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
- Record lists with create, edit, bulk delete and undo, where each row opens a tabbed detail 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 a client store hook whose `create`, `update`, `setStatus` and `remove` each return an `undo`; back them with your API
- Search, filters and sort run in the browser over every row, and `manualSorting` keeps TanStack from sorting again; move that query to your API at scale
- Each page.tsx wraps `DataGridView` in a `min-h-svh` main with padding and a max width; 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.
