Output & generative UI
Diff table
Use when the agent wants to change several records at once and people need to see every edit before it lands.
AI-proposed edits sweeping through tabular data.
Part of Output & generative UI. The stage where the response is a thing, not a paragraph: a document, a set of edits, a record, a chart. These patterns give that output a container the user can review, accept in part, and come back to later.
Do
- Show the old value struck through beside the new one, in the cell where it changes.
- Mark new rows as new.
- Summarise the batch in the header, such as 3 edits and 1 addition.
Don't
- Don't write to the records before Apply.
- Don't describe the edits in a paragraph. Show them in the table they affect.
- Don't highlight cells that are not changing.
States
- Proposed: Changed cells show the old value struck through and the new one in green. New rows are tinted and tagged NEW. Reject and Apply edits sit below.
- Applied: Every cell settles to its new value, the highlights clear, the actions go and the header shows an Applied badge.
Usage
import { DiffTablePattern } from "./halaska-kit";
<DiffTablePattern />
Built from
Badge, Button, Stack, Typography
Related patterns
Halaska UI · Components · Patterns · Screens · Install