Read-only formatted token amount — AmountInput's display sibling, financial type ramp.
Anatomy
−1,234.57 SOL │└───┬───┘ └─ symbol (fg-muted) │ └ magnitude — Math.abs, formatted └ direction — from the signed value (guideline #5: two concerns, two computations)
Props
| Prop | Type | Default | Notes | ||
|---|---|---|---|---|---|
value | number | — | Signed; full precision kept in title. | ||
symbol | string | — | Rendered after the number, muted. | ||
size | "sm" | "md" \ | "lg"` | "md" | The data-* financial type ramp. |
decimals | number | — | Fixed fraction digits; overrides the magnitude default. | ||
className | string | — | cn-merged. |
Default formatting: ≥ 1 → 2 decimals + thousands separators;
< 1 → 4 significant digits. Locale pinned to en-US (deterministic
server/client render).
Motion
None. For values that change live, wrap in RollingNumber — Amount
itself never animates.
A11y
Plain text — screen readers read the formatted number and symbol
naturally. The title attribute carries the unrounded value for
precision on hover. Never encode meaning in color here; sign is the
− character.