Skip to content
mdxcn is now part of Shadcn Labs. details

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.
instead
Two bar groups is Bars. A ranked list is Rank.

traffic

[ 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

[ P95 ]
beforeafter
  • read160142
  • write388410
  • cache1212
<GraphSlope title="P95" fromLabel="before" toLabel="after">

- read: 160 → 142
- write: 388 → 410
- cache: 12 → 12

</GraphSlope>
[ PROPS ]
PropTypeDefaultDescription
titlestring—Caption drawn on the top edge of the frame.
fromLabelstring—Header over the first column.
toLabelstring—Header over the second column.
itemsSlopeItem[]—label, from, and to. Optional when children are Markdown.
childrenMarkdown—- 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.
cornerstring"+"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.
classNamestring—Passed to the outer frame.