Component
Coin Price Tooltip
Shows a token price summary with optional trend details in a tooltip.
Preview
Installation
terminal
$npx shadcn@latest add https://uxdotsol.xyz/r/coin-price.jsonUsage
usage
import { CoinPrice } from "@/components/coin-price"; export default function App() { return ( <div className="flex justify-center p-8"> <CoinPrice tokenName="solana" /> </div> );}.env.local
# .env.localCOINGECKO_API_KEY=your_server_side_keyProps / Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| tokenName | string | 'solana' | Optional token name/id passed to the API as tokenName. Examples: solana, bitcoin, ethereum. |
| apiUrl | string | '/api/coin-price' | Optional backend endpoint. Keep provider keys on the server; do not pass secret-bearing URLs to the client. |
| className | string | undefined | Optional class forwarded to the outer wrapper. |