SolanaUI

TokenCard

The TokenCard component is a card that shows a token's metatda, price, and price history.

Loading...

Loading...

Installation

1. Install Dependencies

Use npm or yarn to install the required dependencies.

2. Install shadcn/ui card component

Use shadcn/ui CLI or manually install the shadcn/ui card component.

3. Install SolanaUI TokenIcon

TokenCard requires the TokenIcon component. Copy the code below to src/components/sol/token-icon.tsx.

4. Install SolanaUI Sparkline

TokenCard requires Sparkline to display the price history. Copy the code below to src/components/sol/sparkline.tsx.

5. Install SolanaUI TokenCard

Copy the code below to src/components/sol/token-card.tsx.

6. Use TokenCard

Import the TokenCard component and use it in your app.