Token Select – Composer Kit
Skip to content

Token Select

Usage

The TokenSelect component is designed to search in list of tokens and select token.

Props

Token

PropTypeDescription
addressstringThe address of the token.
chainIdnumberThe chain ID the token belongs to.
decimalsnumberThe number of decimals the token uses.
namestringThe name of the token.
symbolstringThe symbol of the token.

TokenSelect

PropTypeDescription
childrenReact.ReactNodeThe children nodes to render inside the select.
defaultTokenTokenThe default token to be selected. Optional.
delayMsnumberDelay time in milliseconds before updating the select. Optional.
onChange(token: Token) => voidCallback function that is called when the token is changed. Optional.

TokenSelectOption

PropTypeDescription
classNamestringCSS class name for styling the option. Optional.
childrenReact.ReactNodeThe children nodes for the option. Optional.
onSelect(token: Token) => voidCallback function triggered when the option is selected. Optional.
tokenTokenThe token associated with the option.

TokenSelectInput

React.HTMLAttributes<HTMLInputElement>

TokenSelectGroup

PropTypeDescription
childrenReact.ReactNodeThe children nodes to render inside the group.
emptyMessagestringThe message to display when no tokens are available. Optional.
headingstringThe heading to display for the group. Optional.

TokenSelectDropdown

PropTypeDescription
childrenReact.ReactNodeThe children nodes to render inside the dropdown.
classNamestringCSS class name for styling the dropdown. Optional.
placeholderstringThe placeholder text to show when the dropdown is empty.