๐ช A modern React + Vite Ethereum wallet adapter with wallet connection, balance check, and transaction features โ wrapped in a stunning black-and-gold UI.
Eth-Wallet-Adapter is a plug-and-play Web3 starter that makes integrating wallet connection, ETH balance display, and transaction sending dead-simple โ powered by wagmi, viem, and React.
Built with a premium dark aesthetic (black + yellow theme), itโs perfect for modern decentralized apps, dashboards, or DeFi frontends.
- ๐ฆ Connect / Disconnect Wallets via wagmi hooks
- ๐ฐ Check Live ETH Balance with one click
- ๐ธ Send Transactions easily using
useSendTransaction - โก Instant Feedback โ shows wallet address & TX hash
- ๐จ Sleek Animated UI โ gold hover effects, glowing cards, and motion transitions
- ๐งฉ Modular Components โ reusable
ConnectWallet,SendTransaction, andCheckBalance - ๐ง Built with Vite + React for speed and simplicity
| Technology | Purpose |
|---|---|
| ๐ฆ React (Vite) | Frontend Framework |
| ๐ wagmi | Web3 React Hooks |
| ๐งฎ viem | EVM Interaction Utility |
| ๐จ Custom CSS (Black + Gold) | Premium UI styling |
| ๐ป ES Modules / Modern JS | Clean lightweight build |
git clone https://github.com/Coding-Alchemist-Abhijay/Eth-Wallet-Adapter.git
cd Eth-Wallet-Adapternpm installnpm run devnpm run buildHandles wallet connections using wagmi.
import { useConnect, useDisconnect, useAccount } from 'wagmi';
const ConnectWallet = () => {
const { address, isConnected } = useAccount();
const { connectors, connect } = useConnect();
const { disconnect } = useDisconnect();
return (
<div className="connect-wallet-container">
<h2>Connect Your Wallet</h2>
{isConnected ? (
<>
<p>Connected: {address.slice(0, 6)}...{address.slice(-4)}</p>
<button onClick={() => disconnect()}>Disconnect</button>
</>
) : (
connectors.map((connector) => (
<button key={connector.id} onClick={() => connect({ connector })}>
{connector.name}
</button>
))
)}
</div>
);
};Send ETH to any address in one click.
import { useSendTransaction } from 'wagmi';
import { parseEther } from 'viem';
export function SendTransaction() {
const { data: hash, sendTransaction } = useSendTransaction();
async function sendTx() {
const to = document.getElementById("to").value;
const value = document.getElementById("value").value;
sendTransaction({ to, value: parseEther(value) });
}
return (
<div className="tx-container">
<div className="tx-card">
<h2 className="tx-heading">Send ETH</h2>
<div className="tx-inputs">
<input id="to" className="tx-input" placeholder="Recipient Address" required />
<input id="value" className="tx-input" placeholder="Amount (ETH)" required />
</div>
<button className="tx-btn" onClick={sendTx}>Send Transaction</button>
{hash && <div className="tx-hash">Hash: {hash}</div>}
</div>
</div>
);
}Displays connected walletโs ETH balance in real-time.
import { useBalance, useAccount } from 'wagmi';
const CheckBalance = () => {
const { address, isConnected } = useAccount();
const { data: balance } = useBalance({ address });
return (
<div className="check-balance-container">
<div className="balance-card">
{isConnected ? (
<>
<h2 className="card-title">Wallet Balance</h2>
<p className="wallet-address">{address.slice(0, 6)}...{address.slice(-4)}</p>
<div className="balance-display">
<h3 className="balance-number">{balance?.formatted ?? '0.00'}</h3>
<span className="balance-currency">ETH</span>
</div>
</>
) : (
<p>Please connect your wallet first.</p>
)}
</div>
</div>
);
};- Black + Gold Palette โ a rich, elegant dark theme
- Glowing Borders โ yellow neon pulse around cards
- Hover Animations โ subtle motion + shimmer effects
- Smooth Typography โ Poppins & Courier New for contrast
- Responsive Design โ optimized for all screen sizes
Eth-Wallet-Adapter/
โ
โโโ src/
โ โโโ components/
โ โ โโโ ConnectWallet.jsx
โ โ โโโ SendTransaction.jsx
โ โ โโโ CheckBalance.jsx
โ โโโ styles/
โ โ โโโ ConnectWallet.css
โ โ โโโ Transaction.css
โ โ โโโ CheckBalance.css
โ โโโ App.jsx
โ โโโ main.jsx
โ
โโโ index.html
โโโ package.json
โโโ vite.config.js
โ
Add Token (ERC-20) Transfers
โ
Display Network Name & Switcher
โ
Add Transaction Status Updates
โ
Integrate WalletConnect QR
โ
Light Theme Toggle
This project is MIT Licensed โ feel free to use, modify, and share!
๐จโ๐ป Coding-Alchemist-Abhijay
Building beautiful Web3 tools for the modern internet.
๐ GitHub: Coding-Alchemist-Abhijay