‹ components

TokenIcon

stablev1.0.0·open in canvas

Token logo disc with a graceful initials fallback — the base identity mark for assets (as Avatar is for people).

Installnpx shadcn add @cids/token-icon
Live demo
SO
JU
BO
initials fallback · icon CDN default is a follow-up

Motion · tap to replay

honors reduced-motion

None.

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 { TokenIcon } from "@/design-system";

<TokenIcon src={logoUrl} symbol="JUP" size="md" />
<TokenIcon symbol="SOL" />  {/* no src -> initials disc */}

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.

**Loaded** — the imageround`object-cover`.**Fallback** — no `src`or the image errored : initials disc.

Token logo disc with a graceful initials fallback — the base identity mark for assets (as Avatar is for people).

Anatomy

 ┌────┐          ┌────┐
 │ ◍  │   or     │ JU │
 └────┘          └────┘
  img,            fallback disc:
  rounded-full,   surface-bright,
  object-cover    first 2 letters

Props

PropTypeDefaultNotes
srcstring?—Logo URL. Missing or failing → initials disc. An icon-CDN default (resolve by symbol) is a planned follow-up; today the caller supplies the URL.
symbolstring?"?"First 2 chars uppercase → fallback initials; also the alt/aria-label.
size"sm" "md" \"lg"`"md"20 / 24 / 32 px.
classNamestring—Appended (e.g. ring, border).

Motion

None.

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.