‹ components

TokenChip

stablev1.0.0·open in canvas

Compact inline token reference — icon, symbol, live price, signed 24h change.

Installnpx shadcn add @cids/token-chip
Live demo
JU
JUP$0.8123▲ +4.20%
BO
BONK$0.0000213▼ −1.31%

Motion · tap to replay

honors reduced-motion

None. Prices update by value, not animation — terminal calm (DESIGN.md → Motion).

This component declares no motion.

Brand chip remounts on tap · highlighted tokens are named in this component's doc · spring is budgeted to human feedback only.

import { TokenChip } from "@/design-system";

<TokenChip
  symbol="JUP"
  iconSrc={logoUrl}
  price="$0.8123"        // preformatted by the caller
  change24h={4.2}        // SIGNED — drives arrow/prefix/color
/>

Tokens · live

Resolves in the active theme — flip the toggle above to verify.

States · from doc

Parsed from the doc. Interact with the live demo for hover/active.

**Up / flat** — `▲ +N%` in `text-buy`.**Down** — `▼ −N%` in `text-sell`.

Compact inline token reference — icon, symbol, live price, signed 24h change.

Anatomy

┌ surface, r-4, border outline-variant, p-6×10 ┐
│ ○20  JUP   $0.8123   ▲ +4.2%                  │
│  │    │      │         └ signed 24h: color +   │
│  │    │      └ price, .data-sm                  │   arrow + prefix from SIGN,
│  │    └ symbol, mono 13/medium                  │   number from MAGNITUDE
│  └ TokenIcon sm (20px)                          │
└─────────────────────────────────────────────────┘

Props

PropTypeDefaultNotes
symbolstring—Ticker; also the icon fallback initials.
iconSrcstring?—Token logo; falls back to initials disc.
pricestring—Preformatted (e.g. "$0.8123") — formatting is the caller's job.
change24hnumber—Signed percent. Positive/zero → ▲ + buy; negative → ▼ − sell.
classNamestring—Merged via cn.

Motion

None. Prices update by value, not animation — terminal calm (DESIGN.md → Motion).

A11y

Self-contained: copy the folder into any Tailwind+React app, or use the install command above. Docs and this page render the same file on disk — they cannot drift.