TokenIconWithChain
A component for displaying token logos with an overlaid chain icon.
TokenIconWithChain
The TokenIconWithChain component displays a token logo with its corresponding chain icon overlaid in the bottom-right corner.
Usage
Props
Prop | Type | Default | Description |
---|---|---|---|
chain_id | number | - | Chain ID of the token |
address | string | - | Token contract address |
className | string | - | Additional CSS classes (applied to both icons) |
Features
- Combines TokenIcon with chain logo
- Chain icon is automatically positioned and scaled
- Supports custom styling through className
- Uses consistent icon paths for both token and chain logos
- Responsive layout with Tailwind CSS
Examples
Basic Usage
Custom Size
In a Token List
With Custom Border
Asset Requirements
The component requires two image assets:
- Token logo at:
- Chain logo at:
For example:
Layout Details
The component uses the following layout structure:
- Main token icon as the primary element
- Chain icon positioned at bottom-right
- Chain icon scaled to 50% of the token icon size
- Chain icon has a white border for visual separation
Edit on GitHub
Last updated on