@wallet-ui/react
Modern wallet UI and hooks used by create-solana-dapp templates.
Search across all documentation pages
Modern wallet UI and hooks used by create-solana-dapp templates.
npx create-solana-dapp@latest my-dapp
# includes @wallet-ui/react wired to @solana/kitimport { SolanaProvider } from "@wallet-ui/react";When to reach for this:
"use client";
import { SolanaProvider, useSolana } from "@wallet-ui/react";
function ConnectButton() {
const { connect, connected, account } = useSolana();
if (connected) return <span>{account?.address.slice(0, 4)}…</span>;
return <button onClick={() => connect()}>Connect</button>;
}
export function AppProviders({ children }: { children: React.ReactNode }) {
return (
<SolanaProvider endpoint={process.env.NEXT_PUBLIC_RPC_URL!}>
{children}
</SolanaProvider>
);
}What this demonstrates:
useSolana exposes connect state and addresses.| Alternative | Use When | Don't Use When |
|---|---|---|
| wallet-adapter-react-ui | Legacy tutorials | New template-based apps |
| Fully custom modal | Strong brand control | Tight deadline |
Match RPC URL, wallet network, and program IDs to one cluster.
Use @solana/kit 7.0.0 for new frontend code.
Surfpool 0.12.0 or devnet with faucet SOL.
confirmed for UX; finalized for high-value reads.
Providers in client layout; reads can be server-side.
Show retry; never assume approval.
Compute budget instructions on congested mainnet.
Use Mobile Wallet Adapter for React Native apps.
Never expose server keypairs to the browser.
Regenerate typed clients in CI.
Stack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.
Reviewed by Chris St. John·Last updated Jul 16, 2026