Skip to main content
The widget accepts a config prop of type WidgetConfig. Every field is optional; omit a field to fall back to its default.
Memoize non-primitive config values. Arrays and objects passed inline (like srcChains: [1, 137]) get a new reference on every render and force the widget to re-render its state. Move them to useMemo or to a module-level constant.

Configuration options

Each field is detailed below.

Chains and routes

srcChains, destChains

Restrict the chain dropdowns to a subset. Useful when your integration only services specific networks.
How chain selection behaves:
  • An empty array or one containing only invalid chain IDs falls back to all default chains.
  • Invalid IDs in an otherwise valid list are dropped (with console.warn).
  • Not all source chains can bridge to all destination chains; unsupported pairs are filtered out at runtime.
  • Same-chain swaps (source == destination) are always allowed for any chain in srcChains.

enableCrossChain

Disables the crosschain swap path entirely: users can only swap within a single chain.

enableDelta

When false, hides Delta-mode swaps and Delta-only trade modes (limit, TWAP). The widget falls back to Market-API swaps only.

Trade modes

tradeModes

Restricts which trading forms are visible. Accepts any subset of "swap" | "limit" | "otc" | "twap".
Similar fallback rules apply here:
  • An empty array or one with only invalid modes falls back to all default modes.
  • If the currently selected mode becomes disabled, the widget switches to the first enabled mode.
  • limit and twap are Delta-only. If enableDelta: false (or the user disables Delta in Settings) and your tradeModes list contains only Delta-only modes, the widget falls back to swap.

Theme

theme

See Customize for CSS scoping details.

Hiding UI

excludeUI

Hide specific UI chunks when your host app provides its own equivalents.

Token lists

tokenLists

Add custom token-list URLs. The widget merges them with curated defaults if you spread them.
If you replace defaults entirely (omit the spread), users will only see your tokens.

Behavior flags

enableDegenMode

When true (default), users can toggle Degen Mode in Trading Parameters to trade tokens with high price impact or missing USD price data. When false, the toggle is hidden and users can’t bypass price-impact warnings.

debug

Logs extra diagnostic info to the console. Don’t ship enabled to production.

Pre-filling the form

Use the input prop (not config) to pre-select tokens, amounts, and form type, for example to support deep links into a specific trade.
Last modified on June 14, 2026