Murphy Logo Murphy

Token Combobox

A searchable combobox of tokens and prices with optional user balances.

Token Combobox

Installation

Install shadcn/ui popover and command components

npx shadcn@latest add popover command

Install Murphy TokenIcon

pnpm dlx shadcn@canary add https://www.murphyai.dev/r/token-icon.json

Install Murphy Token Combobox

pnpm dlx shadcn@canary add https://www.murphyai.dev/r/token-combobox.json

Use TokenCombobox

Basic Usage

import {TokenCombobox} from "@/components/ui/murphy/token-combobox.tsx"
<TokenCombobox
assets={assets}
address={publicKey}
showBalances={!!publicKey}
onSearch={searchAssets}
/>

On this page