Installing and importing the SDK
Install the SDK
pnpm i 0xtrails
Import and Use the Widget
import { TrailsWidget } from '0xtrails/widget' export const App = () => { return ( <TrailsWidget toAddress="0x97c4A952b46bEcaD0663f76357d3776ba11566E1" toAmount="1" toChainId={8453} toToken="USDC" /> ) }
<div id="trails"></div> <script src="/js/trails.min.js"></script> <script> TrailsWidget.render(document.getElementById('trails'), { toAddress: '0x...', toAmount: '0.1', toChainId: 8453, toToken: '0xUSDC...' }) </script>
Was this page helpful?