config prop of type WidgetConfig. Every field is optional; omit a field to fall back to its default.
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
enableDelta
false, hides Delta-mode swaps and Delta-only trade modes (limit, TWAP). The widget falls back to Market-API swaps only.
Trade modes
tradeModes
"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.
limitandtwapare Delta-only. IfenableDelta: false(or the user disables Delta in Settings) and yourtradeModeslist contains only Delta-only modes, the widget falls back toswap.
Theme
theme
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.
Behavior flags
enableDegenMode
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
Pre-filling the form
Use theinput prop (not config) to pre-select tokens, amounts, and form type, for example to support deep links into a specific trade.
Related pages
- Customize — theme details and CSS scoping.
- Wallet management —
widgetMode,provider, optionalprivyAppId. - Monetize —
partnerConfigandreferrerConfig. - Widget API reference — full type definitions.