Skip to main content
Composer routes are available automatically when the LI.FI Widget targets a supported position token; no Composer-specific configuration is required. When a user picks a vault token as the destination, the routing engine compares Composer routes with DEX and bridge routes into that token. A same-chain route runs in one transaction; a cross-chain route runs in one, or two if it has a separate destination-chain step. To add the Widget to your app, see Install Widget. For wallet connections, see Wallet Management.

Build a deposit widget

Pre-select the vault token as the destination and lock it, so users only choose the source token and amount:
Omit disabledUI to pre-fill the destination without locking it. chains.from.allow restricts the source chains; chains.allow (without from or to) restricts both lists. See Configure Widget for all chain and token filters and Customize Widget for every disabledUI field, layout variants and theming.

Detect Composer routes in events

The useWidgetEvents hook emits execution events. A route uses Composer when one of its steps has an includedSteps entry with tool: "composer". Subscribe outside the component that renders LiFiWidget to avoid re-renders:
For every event, see Widget Events.

Try it live

Widget Playground

Test Composer flows in the LI.FI Widget