Send Token Form
A Solana token transfer component with shadcn UI styling
Send Token Form
Send Tokens
Installation
Install dependencies
Start by installing required Solana dependencies
pnpm add @solana/web3.js @solana/spl-token @solana/wallet-adapter-react
Add Wallet Provider
Make sure you have added the Wallet Provider to your application. If not, follow the steps in the Connect Wallet Button guide first.
Add Send Token Form
pnpm dlx shadcn@canary add https://www.murphyai.dev/r/send-token-form.json
Basic Usage
Custom Token List
You can provide your own token list:
Custom Transaction Handling
You can provide your own send token function:
Props
Prop | Type | Default |
---|---|---|
tokens? | TokenInfo[] | undefined |
onSendToken? | (values: FormValues) => Promise<void> | undefined |
isLoading? | boolean | false |
showTokenBalance? | boolean | true |
validateDestination? | (address: string) => Promise<boolean> | undefined |
className? | string | undefined |
Types
The component uses the following types: