slope
GraphSlope
Two values per row with an arrow between them. Increases use the accent and decreases fade.
- use it
- Good for a before and after number on each row.
traffic
20252026
- docs8,20012,400
- copy5,1004,100
- ship640860
<GraphSlope title="TRAFFIC" palette="duo" fromLabel="2025" toLabel="2026">
- docs: 8,200 → 12,400
- copy: 5,100 → 4,100
- ship: 640 → 860
</GraphSlope>install
command
latency
beforeafter
- read160142
- write388410
- cache1212
<GraphSlope title="P95" fromLabel="before" toLabel="after">
- read: 160 → 142
- write: 388 → 410
- cache: 12 → 12
</GraphSlope>| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | — | Caption drawn on the top edge of the frame. |
| fromLabel | string | — | Header over the first column. |
| toLabel | string | — | Header over the second column. |
| items | SlopeItem[] | — | label, from, and to. Optional when children are Markdown. |
| children | Markdown | — | - read: 160 → 142 |
| 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. |