WidgetLightConfig object to the config prop of <LiFiWidgetLight>. All configuration must be JSON-serializable because it is sent to the iframe via postMessage.
JSON-Serializable Constraint
Because configuration crosses the iframe boundary viapostMessage (which uses the structured clone algorithm), the following are not supported in WidgetLightConfig:
- React nodes or JSX elements
- Callback functions
- Class instances
- MUI theme objects (
palette,colorSchemes,shape,typography,components)
WidgetLightConfig is a curated subset of the full widget config that only exposes serializable fields — the non-serializable options listed above simply aren’t part of the type, so passing them is a TypeScript error. This is enforcement by omission rather than a general serializability guard, so make sure any nested values you do pass are JSON-serializable at runtime.
If you need the full configuration surface including React nodes and MUI theming, use the full widget instead.
Required Configuration
The only required field isintegrator, which identifies your project in LI.FI analytics:
Configuration Reference
Layout
Appearance
The
theme object supports CSS properties for specific containers. This is not a MUI theme — only serializable CSS properties are accepted:
WidgetTheme fields:
Chain and Token Selection
API and Fees
WidgetFeeConfig fields:
Routing
SDK Configuration
ThesdkConfig field controls API and routing behavior:
WidgetSDKConfig fields:
WidgetRouteOptions fields:
fee, referrer, order, and slippage are not available in sdkConfig.routeOptions. Use the top-level feeConfig, referrer, routePriority, and slippage config fields instead.Allow/Deny Lists
Filter which chains, tokens, bridges, and exchanges are available:UI Controls
Control which UI elements are visible, disabled, or required. Each option uses an object config where keys are UI element names and values are booleans:hiddenUI keys: appearance, drawerCloseButton, history, language, poweredBy, toAddress, fromToken, toToken, walletMenu, integratorStepDetails, reverseTokensButton, routeTokenDescription, routeCardPriceImpact, chainSelect, chainSidebar, bridgesSettings, addressBookConnectedWallets, lowAddressActivityConfirmation, gasRefuelMessage, searchTokenInput, insufficientGasMessage, contactSupport, hideSmallBalances, allNetworks
disabledUI keys: fromAmount, fromToken, toAddress, toToken
requiredUI keys: toAddress, accountDeployedMessage
Wallet Configuration
The
walletConfig.useExternalWalletManagement field is set automatically when you pass onConnect to the component. You do not need to set it manually.Internationalization
Supported language keys:
en, es, fr, de, it, pt, ja, ko, zh, hi, bn, th, vi, tr, uk, id, pl
Miscellaneous
Reactive Config Updates
Configuration is reactive. When you pass a newconfig object, the widget updates in real-time without reloading the iframe:
CONFIG_UPDATE message after the initial handshake. The widget applies the new configuration without a full reload, preserving any in-progress state.
