Set up a minimal Solana wallet integration in Next.js (App Router) with
@solana/kit, the kit plugins, and @solana/react. You’ll create a connect
wallet dropdown and a SOL transfer component.
When prompted, accept all defaults (the starter includes Tailwind, which this
tutorial uses for simple utility styles).
Two scaffold tweaksThe default create-next-app output needs two small changes for this tutorial:
In tsconfig.json, set "target": "ES2020" (or later). The transfer amounts
use bigint literals such as 1_000_000_000n, which require ES2020.
In app/globals.css, remove the generated
@media (prefers-color-scheme: dark) block and the body background rule.
This UI is light-only; the dark defaults otherwise override the bg-white
utility and render the page unreadable in dark mode.
react@latest react-dom@latest keeps React at or above the version
@solana/kit-plugin-wallet expects (19.3.1 or later for 0.23). Without it, npm
can stop with an ERESOLVE error when create-next-app pinned an older React.This tutorial targets Kit 7+, the @solana/kit-plugin-* packages at 0.13+
(0.14+ for @solana/kit-plugin-wallet), and @solana/react 7+.
1
1. Create Solana Provider
app/providers.tsx builds one client at module scope and publishes it with
ClientProvider. The walletSigner plugin makes the connected wallet the fee
payer and identity; export the client type so components can type useClient.
2
2. Update Layout
Wrap your application with the Providers component. Update app/layout.tsx to
import and use it:
This wraps the entire app with the Solana context so all child components can
access the client and wallet hooks.
3
3. Wallet Connect Button
Dropdown to connect/disconnect Wallet Standard wallets. useWallets returns the
wallets discovered in the browser; useConnect / useDisconnect return an
ActionResult — this component uses its dispatch, isRunning, and error
fields. Every wallet hook takes the client as its first argument, so pull it
from useClient<AppClient>() first.
Wallet dropdown options
Wallet dropdown connected
4
4. SOL Transfer
Build a transfer instruction with @solana-program/system and send it through
client.sendTransaction. The connected wallet signs and pays.
SOL transfer form filled
SOL transfer successWallets come from Wallet Standard discovery; once connected, the SOL transfer
uses the connected signer as the fee payer.
5
5. Page
app/page.tsx renders the wallet connect and SOL transfer components:
6
6. Run the Application
Terminal
npm run dev
Open http://localhost:3000, connect a devnet wallet, and send a SOL transfer.
The wallet pays the fee and the amount, so fund its devnet address from the
Solana Faucet first.