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.
Installation
Section titled “Installation”npx shadcn@latest add @0xui/sendpnpm dlx shadcn@latest add @0xui/sendyarn dlx shadcn@latest add @0xui/sendbunx --bun shadcn@latest add @0xui/sendimport { 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.
Build your own
Section titled “Build your own”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" | undefinedconst 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. |
