When to use
- The sign-in button of any dapp or exchange.
- When the connected state should live in the header and reopen an account view.
When not to use
- Email or OAuth sign-in: use a form in a Dialog.
- Showing balances: use Wallet Card once connected.
Installation
pnpm dlx shadcn add @eased-pro/connect-walletnpx shadcn add @eased-pro/connect-walletyarn dlx shadcn add @eased-pro/connect-walletbunx --bun shadcn add @eased-pro/connect-walletInstalls from the @eased-pro registry and MCP server. · Already have Pro? Sign in.
Install the dependencies
pnpm add motionnpm install motionyarn add motionbun add motionAdd the Eased pieces it builds on
Copy each item’s files the same way, or install them with the CLI:
Add the files
- components/eased/connect-wallet/connect-wallet.tsx
Source is included with Eased Pro. Members download the files with the CLI command above, or through the MCP server.
Keep the folder layout
The files import each other by relative path (
../lib/motion), so keep each one at the path shown, undercomponents/eased/.
Usage
import { ConnectWallet } from "@/components/eased/connect-wallet/connect-wallet";<ConnectWallet providers={[{ id: "injected", name: "Browser wallet", detail: "Detected" }]} connect={async (id) => { const address = await yourConnector(id); return { address, name: await lookupEns(address) }; }}/>API reference
ConnectWallet
| Prop | Type | Default | Description |
|---|---|---|---|
providers | WalletProvider[] | { id, name, detail?, icon? }. | |
connect | (id) => Promise<WalletAccount> | Resolve { address, name? }, or reject when declined. | |
account / onAccountChange | WalletAccount | null | Controlled account; uncontrolled when omitted. | |
container | HTMLElement | null | document.body | Dialog portal target. |
label | string | "Connect wallet" | Trigger label. |
Keyboard
| Key | Action |
|---|---|
Tab | Through providers, Cancel, Try again, Disconnect. |
Enter / Space | Choose. |
Escape | Closes the dialog and cancels a pending request. |
Accessibility
- Base UI's Dialog traps focus and returns it to the trigger. The status view is a polite live region ("Opening Browser wallet…", "Connected", "Request declined").
- The pill is named "Wallet: mara.eth".
Motion
Views inside the dialog swap with a 6px rise and a 2px blur on the smooth spring. Connecting shows a spinner badge on the provider tile; on success the tile becomes the account avatar with a check, holds 650ms, then the dialog closes and the avatar flies into the header pill as a shared-layout element on the smooth spring. Reduced motion: cross-fades only, no flight.
Notes for AI
Pick it for wallet sign-in. Wrap your connector (wagmi, a wallet SDK) in connect; it handles states, retry, cancel and the header pill.
Don't add your own spinner or toast for connecting, and don't render a second header avatar: the pill is the connected state. To keep the modal inside a preview frame, give the frame contain: layout and pass it as container.
Related components
- Wallet Card: what to show once connected.
- Animated Modal Dialog: the surface it uses.
- Crypto Token Swap Widget