---
title: "Asset Picker"
description: "Pick one asset from a long list of currencies, coins on their networks, metals, and points. Search by name, code, or contract address."
url: https://gelatinui.com/components/asset-picker
markdown_url: https://gelatinui.com/components/asset-picker.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/asset-picker"
version: "2026-11-12"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Asset Picker

> Pick one asset from a long list of currencies, coins on their networks, metals, and points. Search by name, code, or contract address.

Page: https://gelatinui.com/components/asset-picker

## When to use it

Best for: Pick one asset from hundreds or thousands, with kinds, networks, balances, and search.

- Use it when the list is long and people search by code, name, or address.
- Pass `balances` and `values` to show what people hold, and `recent` for quick picks.
- Pass `onSearch` to find a token that is not on the list by its address.

## When not to use it

- For a short list of plain choices, use a [Select](https://gelatinui.com/components/select.md).
- For a search over app commands, use a [Command](https://gelatinui.com/components/command.md).

## Notes for agents

- Compose `AssetPickerTrigger` and `AssetPickerContent` in `AssetPicker`. Inside the content: `AssetPickerSearch`, `AssetPickerKinds`, `AssetPickerNetworks`, `AssetPickerRecent`, and `AssetPickerList`.
- `value` is an asset id; `onValueChange` gets the id and the asset. A pick closes the picker and clears the search.
- The list is virtual: thousands of rows open fast. Its box keeps one height, so a search never resizes the popup.
- `status` (`loading`, `error`) shows skeleton rows or an error with Retry (`onRetry`).
- A token from `onSearch` with `listed: false` shows a Not listed warning.
- Wider screens get a Popover; phones get a Drawer.

## Anatomy

```text
AssetPicker
├─ AssetPickerTrigger (0..n)
├─ AssetPickerContent (0..n)
├─ AssetPickerSearch (0..n)
├─ AssetPickerKinds (0..n)
├─ AssetPickerNetworks (0..n)
├─ AssetPickerRecent (0..n)
├─ AssetPickerList (0..n)
├─ AssetPickerItem (0..n)
│  └─ AssetPickerItemIcon (0..n)
├─ AssetPickerItemText (0..n)
├─ AssetPickerItemCode (0..n)
├─ AssetPickerItemDetail (0..n)
├─ AssetPickerItemBalance (0..n)
├─ AssetPickerItemCheck (0..n)
├─ AssetPickerEmpty (0..n)
├─ AssetPickerLoading (0..n)
└─ AssetPickerError (0..n)
```

## API reference

### AssetPicker

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `assets` | `readonly Asset[]` |  | Every asset people can pick. |
| `value` | `string \| null` |  | The id of the picked asset (controlled). |
| `defaultValue` | `string \| null` | null |  |
| `onValueChange` | `function` |  |  |
| `open` | `boolean` |  |  |
| `defaultOpen` | `boolean` | false |  |
| `onOpenChange` | `function` |  |  |
| `recent` | `readonly string[]` |  | Ids of the assets picked last, newest first: they show as chips above the list. |
| `balances` | `Readonly<Record<string, string>>` |  | What the wallet holds, decimal strings by asset id: the amount shows at the end of a row. |
| `values` | `Readonly<Record<string, number>>` |  | What each holding is worth in `currency`, by asset id. |
| `currency` | `string` | "USD" | The ISO 4217 code of `values`. Default `"USD"`. |
| `status` | `DataStatus` | "ready" | `loading` while the app fetches the list; `error` when it failed (with `onRetry`); `empty` when it has no assets at all. |
| `onRetry` | `function` |  |  |
| `onSearch` | `function` |  | Finds tokens that are not in `assets` by a pasted address (`0x…`, a Solana mint). Called once per address; the results show with a "Not listed" mark. |
| `locale` | `string` |  |  |
| `labels` | `Partial<AssetPickerLabels>` |  |  |
| `container` | `PopoverContentProps["container"]` |  | Where the panel portals to (Base UI `Portal` `container`), so a scoped app or a playground keeps it in its frame. `AssetPickerContent` may name its own. Default: the document body. |
| `children` | `ReactNode` |  | The parts. Default: the trigger and the content with every part. |

### AssetPickerTrigger

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `busy` | `boolean` |  | The button waits for the app (busy words): a spinner, `aria-busy`, and no clicks. Focus stays on the button. The style hook stays `data-loading`. |
| `spinnerPlacement` | `"center" \| "start"` |  | `center` (default): the spinner covers the label. `start`: it takes the leading icon slot. The icon sizes always use `center`, because their one icon is the label. |
| `glass` | `"clear" \| "dark" \| "light"` |  |  |
| `rounded` | `"default" \| "full"` |  |  |
| `size` | `"default" \| "icon" \| "icon-lg" \| "icon-sm" \| "icon-xs" \| "lg" \| "sm" \| "xl" \| "xs"` |  |  |
| `variant` | `"dashed" \| "default" \| "destructive" \| "destructive-outline" \| "ghost" \| "link" \| "media" \| "outline" \| "secondary"` |  |  |
| `children` | `ReactNode` |  | The face. Default: the picked asset's icon and code, or "Select". |

Also takes every prop of Base UI `Button`: https://base-ui.com/react/components/button

### AssetPickerContent

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `container` | `PopoverContentProps["container"]` |  | Where the panel portals to (Base UI `Portal` `container`). Default: the root's `container`. |
| `children` | `ReactNode` |  | The parts inside. Default: search, kinds, networks, recent, and the list. |

### AssetPickerSearch

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `showClear` | `boolean` |  | Show the clear button while the field has text. Default `true`. |
| `placeholder` | `string` |  |  |

Also takes every prop of Base UI `Combobox.Input`: https://base-ui.com/react/components/combobox

### AssetPickerKinds

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `fullWidth` | `boolean` |  |  |
| `orientation` | `"horizontal" \| "vertical"` |  |  |
| `rounded` | `"default" \| "full"` |  |  |
| `size` | `"default" \| "lg" \| "sm" \| "xs"` |  |  |

Also takes every prop of Base UI `RadioGroup`: https://base-ui.com/react/components/radio-group

### AssetPickerNetworks

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `size` | `"default" \| "lg" \| "sm" \| "xs"` |  | Height 24, 28, 32, or 36px. |
| `className` | `string` |  |  |
| `variant` | `"default" \| "outline"` |  | The look of the items: `outline` (default) for a row of toggles, `default` for quiet rows with no border (a list of places or views in a panel, pressed on the accent fill). |
| `spacing` | `0.5 \| 1 \| 2 \| 3 \| 4` |  | The gap between the items: 0.5 to 4 is 2 to 16px. Default 2 (8px). |
| `rounded` | `"default" \| "full"` |  |  |

Also takes every prop of Base UI `ToggleGroup`: https://base-ui.com/react/components/toggle-group

### AssetPickerRecent

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### AssetPickerList

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `children` | `function` |  | The row of each shown asset, as a render function: `(asset) => <AssetPickerItem>…</AssetPickerItem>`. The items take their asset and place from the list. Default: an `AssetPickerItem` with every part. |

### AssetPickerItem

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `asset` | `Asset` |  | The asset. Default: the asset of the list row this item renders in. |
| `index` | `number` |  | The place in a virtual list (Base UI `index`). Default: the list row's place. |
| `sameCode` | `boolean` |  | Another shown asset has the same code: show the contract, so people can tell them apart. |
| `children` | `ReactNode` |  | The parts. Default: the icon, the text (code and detail), the balance, and the check. |

Also takes every prop of Base UI `Autocomplete.Item`: https://base-ui.com/react/components/autocomplete

### AssetPickerItemIcon

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `children` | `ReactNode` |  | The parts. Default: the picture, the letters fallback, and the network badge. |
| `size` | `"default" \| "lg" \| "sm" \| "xl" \| "xs"` |  |  |

### AssetPickerItemText

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### AssetPickerItemCode

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### AssetPickerItemDetail

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### AssetPickerItemBalance

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### AssetPickerItemCheck

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `alt` | `string` |  |  |
| `color` | `string` |  |  |
| `weight` | `IconWeight` |  |  |
| `mirrored` | `boolean` |  |  |

### AssetPickerEmpty

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `children` | `ReactNode` |  | The words. Default: the query in the line, and how to find a token that is not listed. |

### AssetPickerLoading

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### AssetPickerError

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` |  | The reason. Default: "The list did not load." |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| AssetPicker | `asset-picker-trigger` |  |  |  |
| AssetPickerTrigger | `asset-picker-trigger` |  |  |  |
| AssetPickerContent | `asset-picker-content` |  |  |  |
| AssetPickerSearch | `asset-picker-search` |  |  |  |
| AssetPickerKinds | `asset-picker-kinds` |  |  |  |
| AssetPickerNetworks | `asset-picker-networks` |  |  | `scroll-fade` |
| AssetPickerRecent | `asset-picker-recent` |  |  |  |
| AssetPickerList | `asset-picker-list` |  |  |  |
| AssetPickerItem | `asset-picker-item` |  |  |  |
| AssetPickerItemIcon | `asset-picker-item-icon` |  |  |  |
| AssetPickerItemText | `asset-picker-item-text` |  |  |  |
| AssetPickerItemCode | `asset-picker-item-code` |  |  | `status-colors` |
| AssetPickerItemDetail | `asset-picker-item-detail` |  |  |  |
| AssetPickerItemBalance | `asset-picker-item-balance` |  |  |  |
| AssetPickerItemCheck | `asset-picker-item-check` |  |  |  |
| AssetPickerEmpty | `asset-picker-empty` |  |  |  |
| AssetPickerLoading | `asset-picker-loading` |  |  |  |
| AssetPickerError | `asset-picker-error` |  |  |  |

## Usage

Put the trigger and the content in the picker, and place the search, the kind chips, the recent row, and the list inside the content.

```tsx title="pay-asset.tsx"
import { useState } from "react";

import {
  AssetPicker,
  AssetPickerContent,
  AssetPickerKinds,
  AssetPickerList,
  AssetPickerRecent,
  AssetPickerSearch,
  AssetPickerTrigger,
} from "@/components/pro/pickers/asset-picker";
import type { Asset } from "@/lib/asset-model";

const ASSETS: Asset[] = [
  { id: "eth", kind: "crypto", code: "ETH", name: "Ether", decimals: 18 },
  { id: "usdc", kind: "crypto", code: "USDC", name: "USD Coin", decimals: 6 },
  { id: "eur", kind: "fiat", code: "EUR", name: "Euro", decimals: 2, country: "EU" },
];

export function PayAsset() {
  const [pay, setPay] = useState("eth");
  return (
    <AssetPicker
      assets={ASSETS}
      value={pay}
      onValueChange={setPay}
      recent={["usdc"]}
      balances={{ eth: "1.25", usdc: "2400" }}
    >
      <AssetPickerTrigger />
      <AssetPickerContent>
        <AssetPickerSearch />
        <div className="flex flex-col gap-2 px-3 pt-2">
          <AssetPickerKinds />
          <AssetPickerRecent />
        </div>
        <AssetPickerList />
      </AssetPickerContent>
    </AssetPicker>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/asset-picker
```

It adds 88 registry items: 84 files, 15584 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@phosphor-icons/react`, `@tanstack/react-virtual`, `clsx`, `country-flag-icons`, `motion`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Asset Icon](https://gelatinui.com/components/asset-icon.md)
- [Avatar](https://gelatinui.com/components/avatar.md)
- [Button](https://gelatinui.com/components/button.md)
- [Command](https://gelatinui.com/components/command.md)
- [Drawer](https://gelatinui.com/components/drawer.md)
- [Popover](https://gelatinui.com/components/popover.md)
- [Segmented Control](https://gelatinui.com/components/segmented-control.md)
- [Skeleton](https://gelatinui.com/components/skeleton.md)
- [Spinner](https://gelatinui.com/components/spinner.md)
- [Toggle Group](https://gelatinui.com/components/toggle-group.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Asset Icon](https://gelatinui.com/components/asset-icon.md)
- [Combobox](https://gelatinui.com/components/combobox.md)
- [Command](https://gelatinui.com/components/command.md)
- [Currency Swap](https://gelatinui.com/components/currency-swap.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Type | Search by name, code, or address. |
| Arrow Up, Arrow Down | Move the highlight in the list. |
| Enter | Pick the highlighted asset. |
| Escape | Close the picker; focus goes back to the trigger. |

## Motion

| Part | Motion |
| --- | --- |
| Networks and recent rows | panel · the rows fold open and closed as the kind changes, on the shortest clock that keeps 15px a frame |
