Skip to content

API ReferenceReact componentsInterface

TokenOption

Beta

A token option rendered by the experimental TokenSelect component.

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.

tokenBalance is also the sort key for TokenSortMode 'balance' and the input to 'usd'; the sorts treat a missing balance as 0n. The built-in create-LOC form passes the vault + wallet available collateral, but which balance to show is up to the caller.

Extends

  • TokenIconProps

Properties

address

address: `0x${string}`;

Beta

ERC-20 contract address; the option’s identity. TokenSelect matches selectedTokenAddress against it case-insensitively and hands the matching option back through onSelectToken.


alt?

optional alt?: string;

Beta

The image’s alt text, when it should not be symbol. Pass '' where the symbol is already written beside the icon, so assistive technology doesn’t announce it twice; TokenSelect does that unless an option sets its own.

Inherited from

TokenOption.alt


background?

optional background?: string;

Beta

CSS colour behind the logo (backgroundColor). When set, the image is scaled to 75% so the colour shows as a ring.

Inherited from

TokenOption.background


className?

optional className?: string;

Beta

Extra classes for the icon’s outer element.

Inherited from

TokenOption.className


decimals

decimals: number;

Beta

ERC-20 decimals, used only to render tokenBalance in whole-token units.


disabled?

optional disabled?: boolean;

Beta

Renders the row unselectable and dims its icon, e.g. for a token the caller lists but will not accept (outside a static-LOC allowlist). Distinct from TokenSelectProps.disabled, which disables the whole control.

Overrides

TokenIconProps.disabled;

loading?

optional loading?: boolean;

Beta

Forces the skeleton state regardless of image load, e.g. while token metadata is still being fetched. Defaults to false.

Inherited from

TokenOption.loading


mask?

optional mask?: string;

Beta

'left' or 'right' clips that half of the icon so two icons can overlap as a pair (collateral / credited); anything else (default 'none') draws the full circle.

Inherited from

TokenOption.mask


name

name: string;

Beta

Full ERC-20 name (e.g. USD Coin). Carried on the option for callers; the select itself renders symbol, not name.


placeholder?

optional placeholder?: boolean | null;

Beta

Inherited from

TokenIconProps.placeholder;

size?

optional size?: "md" | "xs" | "sm" | "xl" | null;

Beta

Inherited from

TokenIconProps.size;

src?

optional src?: string;

Beta

URL of the token’s logo. Omit it, or let it fail to load, and a circle with the first letter of symbol is drawn instead.

Inherited from

TokenOption.src


symbol

symbol: string;

Beta

Ticker shown in the trigger and in each dropdown row (e.g. USDC), and the fallback glyph when no icon loads. Also the case-insensitive sort key for TokenSortMode 'alphabetical' and the tiebreak for the other modes.

Overrides

TokenIconProps.symbol;

tokenBalance?

optional tokenBalance?: bigint;

Beta

Balance to show beside the symbol, in the token’s smallest unit (formatted with decimals). Omit it to hide the figure.