Skip to content

Balance Component

The Balance component displays the native token balance (e.g., ETH, MATIC) for Ethereum addresses with support for USD conversion and interactive toggling.

Import

import { Balance } from "@scaffold-ui/components";

Props

PropTypeDefaultDescription
addressAddress-Required. The Ethereum address to show balance for
chainChainFirst chain from WagmiProvider config or mainnetBlockchain network to query
defaultUsdModebooleanfalseStart in USD display mode
styleCSSProperties-Custom CSS styles (memoize to prevent re-renders)

Live Examples

Basic Usage

<Balance address="0xd8da6bf26964af9d7eed9e03e53415d37aa96045" />

Default USD Mode

<Balance
  address="0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
  defaultUsdMode={true}
/>

Custom Chain

import { polygon } from "viem/chains";
 
<Balance
  address="0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
  chain={polygon}
/>;