You can try out the flow and demo of Trails on our sandbox environment here. To install on your own application:
1

Install the SDK

pnpm i 0xtrails
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.
import { TrailsWidget } from '0xtrails/widget'

export const App = () => {
  return (
    <TrailsWidget
      toAddress="0x97c4A952b46bEcaD0663f76357d3776ba11566E1"
      toAmount="1" 
      toChainId={8453}
      toToken="USDC"
    />
  )
}

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.
<div id="trails"></div>
<script src="https://cdn.jsdelivr.net/npm/0xtrails@latest/dist/umd/trails.min.js"></script>
<script>
  TrailsWidget.render(document.getElementById('trails'), {
    toAddress: '0x...',
    toAmount: '0.1',
    toChainId: 8453,
    toToken: '0xUSDC...'
  })
</script>

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
For production use, pin to a specific version by replacing @latest with @1.0.0 or your desired version.