Component
Quick Send Flow
Drop-in SOL send flow with recipient validation, transfer review, wallet approval states, retry handling, and an explorer receipt.
Preview
Installation
terminal
$npx shadcn@latest add https://uxdotsol.xyz/r/quick-send-flow.jsonUsage
quick-send-flow.tsx
"use client"; import { useConnection, useWallet } from "@solana/wallet-adapter-react";import { LAMPORTS_PER_SOL, PublicKey, SystemProgram, Transaction } from "@solana/web3.js";import { QuickSendFlow } from "@/components/uxdotsol/flows/quick-send-flow"; export default function App() { const { connection } = useConnection(); const { publicKey, sendTransaction } = useWallet(); if (!publicKey) return <p>Connect a wallet to continue.</p>; return ( <QuickSendFlow sender={publicKey.toBase58()} senderName="Connected wallet" recipient="" cluster="devnet" connection={connection} networkFee="Calculated by wallet" onSend={async (amount, recipient) => { const transaction = new Transaction().add( SystemProgram.transfer({ fromPubkey: publicKey, toPubkey: new PublicKey(recipient), lamports: Math.round(amount * LAMPORTS_PER_SOL), }), ); return sendTransaction(transaction, connection); }} /> );}Props / Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| senderName / sender | string | 'Connected wallet' / required | Connected-wallet label and required sender address shown in the transfer route. |
| recipientName / recipient | string | undefined / '' | Optional human-readable recipient label and initial destination wallet address. |
| tokenSymbol / presets | string / number[] | 'SOL' / [0.1, 0.5, 1, 5] | Token label and quick amount buttons. |
| networkFee | string | 'Calculated at signing' | Honest fee state or a fee value calculated by the wallet/RPC and shown in the summary. |
| onSend | (amount: number, recipient: string) => Promise<string> | required | Required wallet signing and submission function. It must return the real transaction signature. |
| onConfirm | (signature: string, amount: number, recipient: string) => Promise<unknown> | undefined | Optional real confirmation hook. When omitted, connection tracks the submitted signature. |
| connection / cluster | Connection | null / string | null | Optional Solana RPC and cluster used for live transaction status and explorer links. |
| onSuccess | (signature: string, amount: number, recipient: string) => void | undefined | Called when the send flow confirms successfully. |
| onError | (error: Error) => void | undefined | Called when send or confirmation fails. |
| retrySend | boolean | false | Enables automatic send retries only when onSend is idempotent or can prove a prior broadcast did not land. |

