StealThis .dev

Web3 — Connect Wallet Button + Modal

A polished Web3 connect-wallet flow built with vanilla JS. A glowing neon Connect Wallet button opens a glassy modal listing MetaMask, Coinbase Wallet, WalletConnect, Rabby and Ledger, each with an icon plus an Installed, Popular or Hardware badge. Picking one shows a simulated connecting spinner, then swaps the button for a live address chip with a NOVA balance, green status dot and a dropdown to copy the address, open the explorer or disconnect.

Buka di Lab
html css vanilla-js
Targets: JS HTML

Code

Connect Wallet Button + Modal

A complete, self-contained Connect Wallet experience for a fictional NovaSwap dApp on the Lumen Chain. The primary action is a gradient, glow-shadowed button that opens a glassy modal (gradient border, backdrop blur) listing five wallet options — MetaMask, Coinbase Wallet, WalletConnect, Rabby and Ledger — each with an icon, supporting copy, and an Installed, Popular or Hardware badge.

Selecting a wallet transitions the modal into a connecting state with an animated conic spinner, then resolves into the connected view: the button is replaced by an address chip showing a truncated monospace address (0x7a3f…c41d), the wallet’s NOVA balance, and a pulsing green status dot. The chip opens a dropdown with an account avatar, copy-address, view-on-explorer and a clearly-styled red disconnect action that restores the original button.

Interactions are handled in dependency-free vanilla JS: overlay and Esc-to-close, a Tab focus trap inside the dialog, a cancellable simulated connect delay, clipboard copy, a small toast() helper, and count-up animations on the network stat cards. Monospace is used for every address, amount and gas value, and the whole layout reflows cleanly down to ~360px.

UI-only simulation — no real wallet, RPC, or on-chain calls. Mock data, fictional tokens.