> For the complete documentation index, see [llms.txt](https://legacy-docs.aragon.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://legacy-docs.aragon.org/developers/tools/aragonui/structure/tokenamount.md).

# TokenAmount

The Token Amount component is used to display a token logo followed by an amount and the token symbol.

## Usage <a href="#usage" id="usage"></a>

```jsx
import { TokenAmount } from '@aragon/ui'

function App() {
  return (
    <TokenAmount
      address="0x6B175474E89094C44Da98b954EedeAC495271d0F"
      amount="1049228954700000000000"
      decimals={18}
      symbol="DAI"
    />
  )
}
```

## Demonstration

![](/files/5U29Z95ePqZqdlh9TLu0)

## Props <a href="#props" id="props"></a>

#### `address` <a href="#address" id="address"></a>

| TYPE     | DEFAULT VALUE |
| -------- | ------------- |
| `string` | None          |

The address of the token contract, on the specified `chainId` (only Ethereum Mainnet is supported at the moment).

#### `amount` <a href="#amount" id="amount"></a>

| TYPE                         | DEFAULT VALUE   |
| ---------------------------- | --------------- |
| `BigInt`, `Number`, `String` | None (required) |

The token amount.

#### `chainId` <a href="#chainid" id="chainid"></a>

| TYPE     | DEFAULT VALUE |
| -------- | ------------- |
| `Number` | `1`           |

The [chain ID](https://chainid.network/) for the token. Only Ethereum Mainnet (`1`) is supported at the moment.

#### `decimals` <a href="#decimals" id="decimals"></a>

| TYPE                         | DEFAULT VALUE   |
| ---------------------------- | --------------- |
| `BigInt`, `Number`, `String` | None (required) |

The number of decimals for the token amount, [as specified by the token contract](https://eips.ethereum.org/EIPS/eip-20#decimals).

#### `digits` <a href="#digits" id="digits"></a>

| TYPE                         | DEFAULT VALUE |
| ---------------------------- | ------------- |
| `BigInt`, `Number`, `String` | `2`           |

Rounds the number to a given decimal place.

#### `iconUrl` <a href="#iconurl" id="iconurl"></a>

| TYPE     | DEFAULT VALUE |
| -------- | ------------- |
| `String` | None          |

Overrides the icon URL given by the token address.

#### `size` <a href="#size" id="size"></a>

| TYPE                    | DEFAULT VALUE |
| ----------------------- | ------------- |
| `"large"` or `"medium"` | `"medium"`    |

Size of the component.

#### `symbol` <a href="#symbol" id="symbol"></a>

| TYPE     | DEFAULT VALUE |
| -------- | ------------- |
| `String` | None          |

Overrides the symbol given by the token address.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://legacy-docs.aragon.org/developers/tools/aragonui/structure/tokenamount.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
