# 0xui > Copy-paste web3 React components built on wagmi, viem, Base UI and Tailwind, installed with the shadcn CLI. 0xui is a [shadcn registry](https://ui.shadcn.com/docs/registry) of web3 React components. Components are copied into the app as source, built on wagmi, viem, Base UI and Tailwind CSS v4. Every component handles the states real wallets produce (pending, cancelled in wallet, wrong network, error) and exports its hook, so the logic works with your own UI. To install, the project needs shadcn with the Base UI flavor (`npx shadcn@latest init --base base`; Radix isn't supported) and this in `components.json`: ```json { "registries": { "@0xui": "https://0xui.io/r/{name}.json" } } ``` Then `npx shadcn@latest add @0xui/`. Start with `@0xui/wagmi-config` when the app has no `WagmiProvider` yet. Every page below is Markdown. Append `.md` to any docs URL for its Markdown, read everything at once at https://0xui.io/llms-full.txt, or install the agent skill: `npx skills add https://0xui.io`. ## Getting started - [Installation](https://0xui.io/getting-started/installation.md): Add the 0xui registry to a shadcn project and set up wagmi. - [Conventions](https://0xui.io/getting-started/conventions.md): The rules every 0xui component follows, so once you know one you know them all. - [Hello dapp](https://0xui.io/getting-started/hello-dapp.md): Connect, switch network, show a balance and send a transaction, using only 0xui components. - [Token lists](https://0xui.io/getting-started/token-lists.md): 0xui uses the token list standard, the format of Uniswap's lists. Load any list with useTokenList. - [Indexed data](https://0xui.io/getting-started/indexed-data.md): For production, feed 0xui from an index of the chain, either your own (Postgres + ClickHouse) or a service like Goldsky. - [Sign in with Ethereum](https://0xui.io/getting-started/siwe.md): Prove wallet ownership to your server with Sign Message and viem's SIWE helpers. - [AI agents](https://0xui.io/getting-started/agents.md): Give your coding agent the 0xui docs as Markdown, a skill, the shadcn MCP server or in-browser tools. ## Blocks - [Blocks](https://0xui.io/blocks.md): Whole features assembled from 0xui components. Install one and change what you need. - [Portfolio](https://0xui.io/blocks/portfolio.md): Token holdings with total value, sorted largest first, with spam kept out. - [Send](https://0xui.io/blocks/send.md): Send form for ETH and ERC-20s. Recipient with ENS, amount with balance, and a button that names what's missing. - [Swap](https://0xui.io/blocks/swap.md): Swap form with live quotes, flip, rate, price impact and an approval step. Bring your own quotes. ## Components - [Components](https://0xui.io/components.md): Every 0xui component, grouped by what it is for. ## Components: Wallet Connect, show the account, sign. - [Wallet Button](https://0xui.io/components/wallet-button.md): One button for the whole wallet lifecycle. Connect, restore, account. - [Connect Wallet](https://0xui.io/components/connect-wallet.md): Wallet picker with recent and installed badges, per-wallet pending state and cancel handling. - [Account](https://0xui.io/components/account.md): Connected-account button with a panel for balance, copy, explorer link, account switching and disconnect. - [Sign Message](https://0xui.io/components/sign-message.md): Asks the wallet to sign a message or typed data, with labeled steps and optional verification. ## Components: Network Pick a chain, guard against the wrong one, show its pulse. - [Chain Selector](https://0xui.io/components/chain-selector.md): Network switcher with chain icons, active-chain indicator, per-row pending state and inline errors. - [Network Guard](https://0xui.io/components/network-guard.md): Shows a "Switch to " notice when the wallet is on a network the content doesn't support. - [Chain Badge](https://0xui.io/components/chain-badge.md): Static chain chip with icon and name. - [Block Number](https://0xui.io/components/block-number.md): Live block indicator that doubles as an RPC health check. - [Gas Price](https://0xui.io/components/gas-price.md): Current gas price in gwei, optionally colored low, medium or high. ## Components: Identity Addresses, ENS names and avatars. - [Address](https://0xui.io/components/address.md): ENS name or checksummed, truncated address, with copy and explorer link. - [Address Input](https://0xui.io/components/address-input.md): Recipient field that takes an address or ENS name, resolves names, and catches checksum typos. - [Address Avatar](https://0xui.io/components/address-avatar.md): ENS avatar, or a deterministic gradient for any address. - [ENS Profile](https://0xui.io/components/ens-profile.md): Profile card for an ENS name or address. Avatar, name, bio and links. - [Explorer Link](https://0xui.io/components/explorer-link.md): Link to an address, transaction or block on the chain's block explorer. ## Components: Tokens Balances, amounts and token pickers. - [Token Input](https://0xui.io/components/token-input.md): The swap panel. Amount, token picker, fiat value, balance with Max, insufficient-balance state. - [Token Select](https://0xui.io/components/token-select.md): Searchable token picker with recent and popular tokens and the user's balances. - [Amount Input](https://0xui.io/components/amount-input.md): Large decimal input for token amounts. String state, decimal clamping, lenient paste, Max. - [Balance](https://0xui.io/components/balance.md): Native or ERC-20 balance for the connected account or any address. - [Token Amount](https://0xui.io/components/token-amount.md): Formats bigint token amounts without losing precision. - [Token Icon](https://0xui.io/components/token-icon.md): Token logo with fallbacks and an optional chain badge. - [Add Token](https://0xui.io/components/add-token.md): Button that asks the wallet to track a token, e.g. "Add USDC to wallet". - [NFT Card](https://0xui.io/components/nft-card.md): Image, name and collection for an ERC-721 or ERC-1155 token, from its on-chain metadata. ## Components: Transactions Send, approve, track and read contracts. - [Transaction Button](https://0xui.io/components/transaction-button.md): Sends a transaction and shows every step on the button. Connect, switch network, confirm, pending, done. - [Approve Button](https://0xui.io/components/approve-button.md): ERC-20 approval gate. Shows "Approve" until the allowance covers the amount, then your action. - [Batch Transaction](https://0xui.io/components/batch-transaction.md): Several calls as one action. One wallet prompt with EIP-5792, step by step otherwise. - [Transaction Status](https://0xui.io/components/transaction-status.md): Inline card that follows a transaction from submitted to confirmed. - [Transaction Toast](https://0xui.io/components/transaction-toast.md): Follow a transaction in a toast, from pending to confirmed or reverted. - [Transaction History](https://0xui.io/components/transaction-history.md): Transactions sent from your app, with live status. Stored in the browser. - [Contract Form](https://0xui.io/components/contract-form.md): Read and write forms for any contract, generated from its ABI. - [Event Feed](https://0xui.io/components/event-feed.md): Live list of a contract's events, newest first, each linked to its transaction. ## Components: Utilities Small pieces the other components are built from, and tools for browser agents. - [Copy Button](https://0xui.io/components/copy-button.md): Icon button that copies a value and confirms with a checkmark. - [Responsive Dialog](https://0xui.io/components/responsive-dialog.md): A dialog that becomes a bottom drawer on small screens. - [Morph Text](https://0xui.io/components/morph-text.md): Text that morphs from the old value to the new one when it changes. - [Agent Tools](https://0xui.io/components/agent-tools.md): WebMCP tools that let browser agents read the wallet, its balances and chains, without clicking through your app. ## Registry Items without a docs page. Other components install them as dependencies. - [wagmi-config](https://0xui.io/r/wagmi-config.json): Starter wagmi setup: lib/wagmi-config.ts (mainnet + sepolia, injected connector, SSR on) and a Web3Provider component that wraps WagmiProvider and a TanStack QueryClientProvider. Install once, wrap your app in , then add any 0xui component. - [0xui-utils](https://0xui.io/r/0xui-utils.json): Shared web3 formatting helpers used by 0xui components: truncateAddress (checksummed 0x1234…abcd), formatTokenAmount (bigint + decimals to a locale string without float precision loss, rounds toward zero, compact notation, '<0.0001' for dust), parseAmount (lenient user input to bigint: '.5', '1,000.5', '1.000,5', clamps to token decimals), getExplorerUrl (address/tx/block links from chain.blockExplorers) isUserRejection (detects a dismissed wallet prompt), resolveUri (ipfs:// and ar:// to HTTP), isShieldedAddress (private 0zk address check: length, alphabet and bech32m checksum) and encodeBech32m. - [token-list](https://0xui.io/r/token-list.json): Token list standard (tokenlists.org, as used by Uniswap) for 0xui: TokenInfo and TokenList types (including tags and extensions such as Uniswap's bridgeInfo), parseTokenList (validates, drops non-EVM entries such as Solana tokens, checksums addresses), fetchTokenList (http, ipfs, ar), mergeTokenLists, nativeToken(chain) (lists don't include ETH), applyTokenFilters (allowlist/whitelist and blocklist by address or chainId:address), TokenPrices and getTokenPrice (prices keyed by chainId:address, address or symbol; address keys win), looksLikeSpam (cheap scam-token heuristic: claim/airdrop text, links, domain symbols, invisible characters, lookalike letters), NATIVE_TOKEN_ADDRESS and UNISWAP_DEFAULT_LIST. - [use-token-list](https://0xui.io/r/use-token-list.json): Load one or more token lists by URL (e.g. https://tokens.uniswap.org) with TanStack Query (cached for the session, one retry), merge and de-duplicate them, filter to the current or a given chain, apply an allowlist (whitelist) or blocklist, and put the native currency first. Returns { tokens, lists, isLoading, error }, ready for TokenSelect, TokenInput, Swap, Send and Portfolio. - [use-mounted](https://0xui.io/r/use-mounted.json): SSR guard hook: false during server render and hydration, true afterwards. Keeps browser-only wallet state out of server HTML to avoid hydration mismatches. Built on useSyncExternalStore, so there is no extra render on client-only apps. - [use-copy](https://0xui.io/r/use-copy.json): Clipboard hook: copy(text) writes to the clipboard and sets copied=true for a configurable timeout. Resolves false when clipboard access is unavailable or denied. ## Examples Every component and block has a runnable example: `npx shadcn@latest add @0xui/-demo`, or read it at https://0xui.io/r/-demo.json. The shadcn MCP server finds them by name. ## Optional - [Full docs](https://0xui.io/llms-full.txt): every page above in one file. - [Registry index](https://0xui.io/r/registry.json): every item with its dependencies. - [Agent skill](https://0xui.io/.well-known/agent-skills/0xui/SKILL.md): how to build with 0xui.