Magoo Component UI logo Magoo Component UI
← Catalog

Token Price Card

token-price-card molecule experimental

A compact token price card - symbol and name, a large price, a coloured change pill and a sparkline.

Also in: Cards

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default

ETH

Ethereum

+4.2%

$3,150.42

Down

SOL

Solana

-3.7%

$142.08

Props

NameTypeReq
symbol string ✓
name string ✓
price string ✓
change_pct string ✓
change_dir enum (up | down) ✓
spark_path string ✓

Related components

How to use

There is no JavaScript - the whole card is static markup. The change_dir prop drives colour via data-[dir=up]/data-[dir=down] utilities (pill background and text on the pill, arrow direction via a grouped data attribute, and the sparkline stroke on the path). Precompute the sparkline geometry and pass it as the spark_path 'd' string.

Use cases

cardgrid WCAG AA SEO 35 dir: both ai-generated