---
title: "Amount"
status: accepted
source: "apps/web/components/ui/amount.tsx"
updated: "21.11.2026."
url: https://design.mojakirija.rs/components/amount
---

# Amount

Accepted · apps/web/components/ui/amount.tsx

A figure at one of the sizes the product draws figures at, with its currency beside it.

Import from `@/components/ui/amount.tsx`. The role names what the figure is on the screen; the size is the consequence. Formatting is not this component's job: `formatMoney` writes `52.830,00` and Amount takes that string.

## Roles

```tsx
<Amount role="page" currency="RSD">12.345,00</Amount>
<Amount role="card" currency="RSD">8.120,50</Amount>
<Amount role="row" currency="RSD">4.200,00</Amount>
<Amount role="bill" currency="RSD">-1.500,00</Amount>
<Amount role="inline" currency="RSD">{null}</Amount>
```

## Rules

- A leading hyphen becomes U+2212, the minus sign, which has the tabular advance.
- A negative stays ink: money going the other way is not an exception.
- No figure yet is an em dash in the figure's face, with no currency after it.
- An amount never animates.

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | string \| null | — | The figure as `formatMoney` wrote it (`52.830,00`). `null` or `""` draws an em dash and no currency. |
| `currency` | string | — | `RSD`, `EUR`, `kWh`, `m²`, set beside the figure, never inside it. |
| `role` | "page" \| "card" \| "row" \| "bill" \| "inline" | "inline" | What the figure is on the screen; the size follows. `page` is the one number a screen exists for. |
