Send
Route funds to a recipient with Nexus intents.
Network support: Mainnet only. Testnet is not supported at the moment.
Configurator
Installation
pnpm add @avail-project/widgets
Usage
import { NexusWidget } from "@avail-project/widgets";
const USDC_BASE = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
const RECIPIENT = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045";
export function SendExample({ address }: { address?: `0x${string}` }) {
return (
<NexusWidget
connectedAddress={address}
config={{
mode: "send",
destination: {
chain: 8453,
tokens: [{ address: USDC_BASE, symbol: "USDC", decimals: 6 }],
},
recipientAddress: RECIPIENT,
prefill: { amount: "0.1" },
}}
/>
);
}Configuration
mode: "send". This mode is exact-out: users enter the token amount to send, pay-with sources are selected, and the flow submits through the Nexus transfer execution path.
| Prop | Required | Description |
|---|---|---|
config.mode | Yes | Must be "send". |
config.destination.chain | Optional | Restricts the destination chain selection. |
config.destination.tokens | Optional | Restricts the send-token selector. When supplied with destination.chain, users can only pick from this list. |
config.recipientAddress | Optional | Prefills the recipient. A supplied recipient is locked; otherwise the user enters one before submitting. |
config.prefill.amount | Optional | Prefills the exact output send amount. Must be greater than 0. |
config.prefill.token | Optional | Initial send token: { chain, address, symbol, decimals, logo? }. Unlike destination.tokens, it does not restrict later token choices. |
config.validation.minAmount, config.validation.maxAmount | Optional | Bounds on the send amount. |
config.appearance | Optional | Branding overrides: heading, appName, appLogoURL, primaryColor, mode. |
connectedAddress | Optional | Wallet address to use. If omitted, the connected wagmi account is used. |
embed | Optional | Defaults to true. Set false to render as a modal surface. |
open, onOpenChange, defaultOpen | Optional | Control the modal when embed={false}. |
onStart, onComplete, onError, onClose, onConnectClick | Optional | Host app callbacks. Use onConnectClick to route the widget's Connect Wallet CTA to your app-level wallet flow. |
interface NexusWidgetDestinationToken {
address: `0x${string}`;
symbol: string;
decimals: number;
logo?: string;
}
interface NexusWidgetSendConfig {
mode: "send";
destination?: {
chain?: number;
tokens?: NexusWidgetDestinationToken[];
};
recipientAddress?: `0x${string}`;
prefill?: {
amount?: string;
token?: NexusWidgetDestinationToken & { chain: number };
};
validation?: {
minAmount?: string;
maxAmount?: string;
};
appearance?: {
heading?: string;
appName?: string;
appLogoURL?: string;
primaryColor?: string;
mode?: "system" | "light" | "dark";
};
}How is this guide?