Skip to content

PriceChange

Stable

A signed change with an arrow, as an amount, a percent or both.

Also known as delta, change percent, trend

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

Up, down and flat

Up +₹32.50 (+1.14%) Down −₹18.40 (−0.47%) Unchanged No change

The arrow and the sign show the direction. Zero shows a dash and a label.

When to use it

Shows the size and direction of a move in a way that does not depend on colour.

Made of: Hidden direction word · Arrow · Sign · Amount · Percent

Use it for

  • The change beside a price in a list or a ticker.
  • A day change in a table column.
  • A percent move on its own.

Not for

  • A headline number with its comparison text: use StatTile.
  • An amount that is not a change: use Money.
  • Many changes in rows and columns: use DataTable.

Do and avoid

Up +₹12.40 (+0.42%)Down −₹18.20 (−0.44%)
Do. An arrow and a sign show the direction, not just the color.
12.4018.20
Avoid. Color alone hides which way it moved from many people.

Do

  • Pass the real signed change and let the part add the sign.
  • Use percent only in tight spaces.
  • Set flatLabel when a zero change needs a word.

Avoid

  • Do not show a change as colour alone.
  • Do not type the arrow or the minus yourself.
  • Do not use it for a total. Use Money.

On a phone

  • It never wraps and keeps the arrow and the numbers on one line, so make sure its container is wide enough.
  • It has no hover or tap behaviour, and the direction is shown with an arrow and words, not colour alone.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started