Zero-Code Composer
If you already have the LI.FI Widget integrated, Composer is already available to your users. No additional configuration is needed. When a user:- Selects a vault token (e.g., a Morpho vault) as the destination token
- The Widget automatically detects this is a Composer route
- Displays the estimated vault tokens the user will receive
- Executes the full Composer flow (swap + deposit) in a single transaction
Basic Setup
If you haven’t integrated the Widget yet, here’s a minimal setup:Configuring Composer in the Widget
Pre-select a Vault Token
You can pre-configure the Widget to target a specific vault token, creating a focused deposit experience:Lock the Destination
To create a dedicated deposit widget (e.g., “Deposit into Morpho”), lock the destination so users can’t change it:Filter Source Chains and Tokens
Restrict which source chains or tokens are available:Listening for Composer Events
The Widget emits events during execution. Use these to track Composer transactions in your application:Widget Variants for Composer
The Widget supports different visual variants. For Composer use cases, consider:| Variant | Best For |
|---|---|
default | General-purpose swap/bridge/deposit widget |
compact | Embedded deposit widgets with limited space |
drawer | Slide-out panel for deposit flows |
Customizing Appearance
Match the Widget to your app’s design system:Wallet Management
The Widget can manage wallet connections internally or integrate with your existing wallet provider. See Wallet Management for details on connecting external wallet providers.Try It Live
Test Composer in the Widget Playground:Widget Playground
Interactive playground to test Composer flows with the LI.FI Widget

