Display · Amountstable
Amount
Displays and formats money: currency, value and decimals as one figure, with tabular numbers so columns line up. Four sizes, neutral, positive and negative colour, compact (12k) and code currency display. Non-interactive.
Preview
#previewChange the options and the code follows. Show code opens the React snippet.
amount-example.tsx
import { Amount } from "@blade-ai/weft/components/amount";
<Amount
value={12480.5}
/>All states
#all-statesColours, sizes, compact and currency-code forms, from the Amount artboard.
Props
#propsRead from the component source. Booleans are is-prefixed. A star marks a required prop.
Prop
Type
Default
Description
value *
number
—
Numeric value in major units (1000.5 = 1,000.50).
currency
string
"USD"
ISO 4217 code, e.g. "USD".
currencyDisplay
"symbol" | "code"
"symbol"
Show the currency as a symbol ("$") or as its code ("USD").
isCompact
boolean
false
Humanize large numbers: 12,000 becomes 12k.
fractionDigits
number
—
Fraction digits shown. Defaults to 2, or 0 when compact.
size
"sm" | "md" | "lg" | "xl"
"sm"
Type scale: 14 / 16 / 24 / 30px value.
color
"neutral" | "positive" | "negative"
"neutral"
neutral for plain figures, positive / negative for credits and debits.
locale
string
"en-US"
BCP 47 locale used for grouping and symbols.
Usage
#usageShort rules for choosing and writing amount.
Do
Pass a number; formatting is handled with Intl.NumberFormat.
Use positive and negative colours only when the direction of the money matters.
Right-align amounts in tables so decimals line up.
Don't
Put letters or placeholder symbols inside the value.
Restyle the currency, value or decimals one by one; use size and color.
Use compact form where exact figures matter.
Accessibility
#accessibilityRendered as one element so a screen reader reads the whole amount.
ARIA
Element
Role / attribute
When
Amount
single text element
Reads as "$1,000.00", not as separate parts.
Compact amounts
aria-label or visually-hidden text
Add the full amount when a short form such as 12k could be ambiguous.
Negative values
minus sign in the text
Colour never carries the sign alone.