Skip to main content

DeltaValue

A figure with its period-on-period change. Direction is carried by the arrow glyph, so it survives greyscale.

Signature
Density
Viewport
Theme and light/dark are set in the top bar
Live demo
Open ↗

When to use​

A figure with its period-on-period change.

Accessibility​

Rendered as a real <table> with header scopes; sortable columns expose aria-sort. Row selection and actions are keyboard reachable.

Install and import​

npx shadcn@latest add @prism/delta-value
import { DeltaValue } from '@/components/prism/DeltaValue';

In a no-build prototype, read it from the bundle instead: const { DeltaValue } = window.PrismDesignSystem_39d121;

Props​

PropTypeRequiredDescription
valueReact.ReactNode—The headline figure. Pre-formatted — this component does not format it.
deltanumberYesSigned change. Sign picks the arrow; magnitude is displayed via formatDelta.
unitstring—Suffix on the change. Default "%".
invertToneboolean—Set when DOWN is the good outcome — cost, churn, latency, defect rate.
showValueboolean—Hide the figure and show only the change chip. Default true.
size"sm" | "md" | "lg"—
neutralboolean—Force the neutral tone — for a change that is neither good nor bad.
formatDelta(delta: number) =&gt; string—Custom formatter for the change magnitude. Receives the signed number.
labelstring—What the figure measures, folded into the screen-reader label.
classNamestring—