Trend Pill

A washed delta chip — arrow plus change — for the corner of a KPI tile, with direction and sentiment set independently.

tsx
import { TrendPill } from "@pestoui/core"

Direction and sentiment

direction picks the arrow; sentiment picks the colour. They are separate because a falling error rate points down and is still good news.

12.4%3.1%0.8%5.6%

Beside a label

The pill sets no line height of its own, so it takes its row's and centres against the label. srLabel adds a spoken prefix — the arrow is silent.

Runs this weekUp 8.2%
Failed runsDown 1.9%

Props

PropTypeDefaultDescription
direction"up" | "down"—Required. ArrowUpRight or ArrowDownRight.
sentiment"positive" | "negative""positive"Success or destructive wash and ink. Independent of direction.
srLabelstring—A screen-reader-only prefix, e.g. “Up”. Rendered only when given.
childrenReactNode—The change, already formatted.
classNamestring—On the pill. No line height is set, so it takes the row's.

Pesto UI · 117 documented components