Skip to main content

Focused components

Shared props

All focused components accept these optional props in addition to their mode-specific props.

Appearance

App metadata

Used in wallet connection dialogs (WalletConnect, etc.):

Wallet options

The wagmiConnectors and decoupleWagmi props were removed in [email protected]. Wagmi is no longer required by default — pass adapters on the widget’s adapters prop instead. See Adapters.

Route options

Debug / dev

General callbacks

These callbacks are available on all focused components (in addition to mode-specific lifecycle callbacks):
When a settlement is armed (via the stripe or settlement props), onSuccess/onPaymentSuccess carries an optional settlement field of type IntentSettlement, and the widget holds the success event until the processor confirms settlement.

Callback payloads

Every callback that fires after a quote exists carries two identifiers: The *Start callbacks (onPaymentStart, onFundingStart, …) fire before quoting, so they carry only sessionId. onOpen and onClose have no payload.
The payload types are exported from 0xtrails:
  • CheckoutEventBase — { sessionId: string; intentId: string | null }
  • TransactionConfirmationEvent — { txHash: string; chainId: number; sessionId: string; intentId: string | null }

ChainIdentifier

All chain fields accept a ChainIdentifier, which can be:
  • A chain name string: "base", "ethereum", "polygon", "arbitrum", "optimism", "avalanche", "bsc", "katana", etc.
  • A numeric chain ID: 8453, 1, 137, etc.
  • A viem Chain object

PaymentMethod

The paymentMethod prop on focused components accepts:

Mode-specific props

See the individual mode pages for full prop details:
  • Pay — to.recipient, to.currency, to.chain, to.amount, payMessage, onPaymentStart/Success/Error
  • Fund — to, fundMethodsList, hideUnlistedFundMethods, hideSwap, onFundingStart/Success/Error
  • Swap — from, to, onSwapStart/Success/Error
  • Withdraw — from, to, onWithdrawStart/Success/Error
  • Earn — to with calldata, onEarnStart/Success/Error