diff
GraphDiff
What was added, removed or kept. Write `- app: +31 kb` and bold the total. `- ~~old~~ new` draws one removed line and one added line. For numbers before and after, use Slope.
- use it
- Good for showing what was added, removed, or kept.
- instead
- A list of numeric before and after is Slope.
bundle
- vendor84 kb
- app31 kb
- sourcemaps12 kb
shipped103 kb
<GraphDiff title="BUNDLE" palette="duo">
- vendor: 84 kb
- app: +31 kb
- sourcemaps: -12 kb
- **shipped: 103 kb**
</GraphDiff>install
command
headcount
- start12
- hired3
- left1
now14
<GraphDiff title="HEADCOUNT">
- start: 12
- hired: +3
- left: -1
- **now: 14**
</GraphDiff>rename
Strike the old text and write the new after it. One row becomes a removed line and an added line.
- config: next.config.js
- config: next.config.ts
- middleware: middleware.ts
- middleware: proxy.ts
- app31 kb
<GraphDiff title="MIGRATION">
- config: ~~next.config.js~~ next.config.ts
- middleware: ~~middleware.ts~~ proxy.ts
- app: +31 kb
</GraphDiff>| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | — | Caption drawn on the top edge of the frame. |
| rows | DiffRow[] | — | label, value, and optional sign: add, remove, or keep. Optional when children are Markdown. |
| children | Markdown | — | - app: +31 kb |
| footer | DiffRow | — | Total row under a rule. |
| palette | "mono" | "duo" | "multi" | "mono" | mono is one accent plus muted. duo paints the second series with --graph-accent-2. multi cycles three accents. |
| corner | string | "+" | Character at each corner of the frame. |
| frame | "box" | "corners" | "rule" | "none" | "box" | box draws the dashed border. corners keeps only the corner marks. rule draws dashed lines above and below. none drops the border and padding, and puts the title above the content. |
| className | string | — | Passed to the outer frame. |