TypeScript SDK
BuyWidget
Widget is a prebuilt UI for purchasing a specific token.
The BuyWidget component requires client, chain, and amount props to function.
You can specify a token to purchase by passing the tokenAddress prop.
You can customize the supported tokens that users can pay with by passing a supportedTokens object to the BuyWidget component.
You can customize the UI of the BuyWidget component by passing a custom theme object to the theme prop.
Refer to the Theme type for more details.
You can update the title of the widget by passing a title prop to the BuyWidget component.
You can customize the wallet connection flow by passing a connectOptions object to the BuyWidget component.
Refer to the BuyWidgetConnectOptions type for more details.