caliper uidocs

Crypto wallet

Pro

Balances, assets and recent transfers for a wallet.

Installs components/ui/crypto-wallet.tsxDepends on @radix-ui/react-dialog, @radix-ui/react-popover, @radix-ui/react-slot, lucide-reactMotion none in component source
pnpm dlx shadcn@latest add @caliper/crypto-wallet

Total balance

$10,822.00

  • Ether

    2.4 ETH

    $5,952.00

    ▲ 2.3% in 24 hours

  • USD Coin

    1520 USDC

    $1,520.00

    ▲ 0.0% in 24 hours

  • Wrapped Bitcoin

    0.05 WBTC

    $3,350.00

    ▼ 1.4% in 24 hours

Activity

  • Received from 0x9a3f…d9ef

    Today, 09:12 · Confirmed

    +0.5 ETH
  • Sent to 0x5be1…06b3

    Yesterday · Confirmed

    −200 USDC

When to use #

Use it for

  • Showing what a user holds and moved.

Skip it when

  • The balances are not final.

Installation #

terminal
pnpm dlx shadcn@latest add @caliper/crypto-wallet

Adds its 7 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage #

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { CryptoWallet } from "@/components/ui/crypto-wallet"

The worked example comes with Pro

The 18-line example behind the preview opens here with a Pro or Team licence.

Checking your licence…

API reference #

CryptoWallet

component
PropTypeDefault
assets *readonly WalletAsset[]—
activity *readonly WalletActivity[]—
onSend *(symbol: string, to: string, amount: number) => Promise<string | void>—
classNamestring—

Accessibility #

It exposes status and alert semantics, with aria-label, aria-pressed, aria-hidden, aria-labelledby and aria-invalid kept in step with state. Changes that matter are announced through a live region.

Keyboard and focus handling comes from Radix dialog and popover: arrow keys move through items, Enter and Space select, and Escape closes and returns focus.

Motion #

It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.