Skip to content

Blocks

Send

Send form for ETH and ERC-20s. Recipient with ENS, amount with balance, and a button that names what's missing.

A complete send flow built from Address Input, Token Input, Transaction Button and Transaction Status. The button names the next thing to do: “Enter a recipient”, “Enter an amount”, “Insufficient USDC balance”, then “Send USDC”.

Send

ETH

Tokens use the token list standard. The demo uses Uniswap’s default list, loaded live with useTokenList.

Terminal window
npx shadcn@latest add @0xui/send
import { Send } from "@/components/send";
<Send tokens={tokenList.tokens} prices={prices} onSuccess={() => refetch()} />;

Native currency (NATIVE_TOKEN_ADDRESS) is sent as a value transfer. ERC-20s call transfer(to, amount). The transaction runs on the selected token’s chain, and the button offers a network switch if needed.

Send is about 100 lines. If you need a different layout, copy it, or use its pure helpers:

import { sendBlocker, sendRequest } from "@/components/send";
const blocker = sendBlocker(draft, { recipientPhase, insufficient }); // "Enter an amount" | undefined
const request = sendRequest({ recipient, amount, token }); // { transaction } | { contract }
Prop Type Default Description
tokens Token[] — Sendable tokens. One token locks the picker.
defaultToken Token first token Initial token.
popular string[] — Quick picks.
prices Record<symbol, number> — Fiat values.
onSubmitted / onSuccess — — Transaction callbacks.
title ReactNode "Send" Heading. null hides it.