---
title: "Delta"
description: "A signed change, with polarity and a redundant non-color cue."
canonical: "https://lopifi.com/components/delta"
---

# Delta

> A signed change, with polarity and a redundant non-color cue.

Source: https://lopifi.com/components/delta
Part of: Lopifi — Your VC tech stack partner (https://lopifi.com)

---

- **Family:** Primitives — The layer everything else composes. Build these first; nothing above them is right until they are.
- **Status:** Implemented
- **Spec:** https://lopifi.com/docs/catalog/primitives

## Install

```bash
npx shadcn@latest add @lopifi/theme
npx shadcn@latest add @lopifi/delta
```

## Specification

> A signed change. Never colored without a redundant cue.

```tsx
<Delta value={{ amount: 12400, currency: "USD" }} percent={5.3} polarity="standard" />
// ↑ +$12,400.00 (+5.3%)
<Delta value={{ amount: 8200, currency: "USD" }} polarity="inverted" />
// ↑ +$8,200.00   ← colored NEGATIVE, because up is bad for this metric
```

```ts
interface DeltaProps {
  value: MoneyValue | null;
  percent?: PercentChange;              // { kind: "points" | "relative"; value: number }
  polarity: "standard" | "inverted" | "neutral"; // required, no default
  showArrow?: boolean;                  // default true
  showPercent?: boolean;
  basis?: string;                       // "vs. Aug" — never omit the comparison basis
}
```

**Polarity is the point.** A `-4.2%` change in burn is good. Default everything to `standard` and the dashboard shows green on a cost overrun.

**API change:** `polarity` is now required and has no default (it previously fell back to `standard`). Callers that omitted it must choose: `standard` for revenue, cash and margin; `inverted` for cost, expense, DSO and burn; `neutral` for an FX rate or a headcount.

**Structure:** `[arrow] [sign] [value] [(percent)] [basis]`. The sign slot is reserved so a column of deltas aligns even when some are unchanged.

**Zero delta:** `—` with `--neutral-value`, no arrow. Not `+0.0%`.

**Motion:** none. Value flash when live.

## Rules this component obeys

Money is minor units, never floats. `null` is not `0` and neither is redacted. Negatives render in accounting parentheses with the parenthesis column reserved on both sides. Debit and credit are two columns. Per-currency decimal places. Polarity is explicit — up is not always good. Every figure states its period, entity, currency, basis and as-of.
