Skip to content

API ReferenceReact componentsType Alias

TokenSortMode

type TokenSortMode = 'alphabetical' | 'balance' | 'usd';

Beta

Ordering applied to a TokenSelect’s tokens list.

  • alphabetical — case-insensitive ascending by symbol.
  • balance — descending by the user’s tokenBalance (raw on-chain amount), with case-insensitive alphabetical tiebreak. Tokens without a balance tie at 0n and fall through to alpha.
  • usd — descending by the USD-equivalent value of the user’s balance, with alpha tiebreak. Pair this mode with USD values produced by useTokenUsdValues; tokens whose value is unknown (still loading or no Pyth feed) tie at 0n and fall through to alpha.

Remarks

Part of the SDK’s experimental React component surface — may change or be removed without notice and is not part of the compatibility contract.