1
Install the SDK
2
Import and Use the Widget
Add the widget to your React application, for example send 1 USDC cross-chain to a recipient on Base.
Next steps
- Pay: Buy NFTs, RWAs, or any asset using any token from any chain; Trails aggregates balances and handles bridging, swapping, and execution.
- Swap: Cross-chain token swaps in a single confirmation with unified liquidity and optimal routing—no manual bridging or DEX hopping.
- Fund: Deposit into a chain, app, or protocol from any token on any chain in one flow; Trails optimizes routes and handles swaps/bridges.
- Earn: Deposit into vaults/pools (e.g., Aave) with automatic swap/bridge to the required asset; confirm once and start earning.
- Configuration: Full list of variables to customize Trails including different modes, theming, enabling gasless transactions, events, and quote providers.
Script Import
While we recommend using the React component, you can also embed via a script tag in a non-React site.Available CDNs
- unpkg:
https://unpkg.com/0xtrails@latest/dist/umd/trails.min.js
- jsDelivr:
https://cdn.jsdelivr.net/npm/0xtrails@latest/dist/umd/trails.min.js
@latest
with @1.0.0
or your desired version.