Getting started
Installation
Add the 0xui registry to a shadcn project and set up wagmi.
0xui is a shadcn registry. Components are copied into your project as source, so you own and can edit them.
1. Set up shadcn
Section titled “1. Set up shadcn”If your project doesn’t use shadcn yet, follow the shadcn installation guide for your framework. You need Tailwind CSS v4 and a components.json.
0xui needs the Base UI flavor of shadcn (npx shadcn@latest init --base base). The Radix flavor isn’t supported: components use Base UI props that Radix primitives don’t have.
2. Add the 0xui registry
Section titled “2. Add the 0xui registry”Add the @0xui namespace to components.json:
{ // ... "registries": { "@0xui": "https://0xui.io/r/{name}.json" }}3. Add wagmi
Section titled “3. Add wagmi”npx shadcn@latest add @0xui/wagmi-configpnpm dlx shadcn@latest add @0xui/wagmi-configyarn dlx shadcn@latest add @0xui/wagmi-configbunx --bun shadcn@latest add @0xui/wagmi-configThis adds two files:
lib/wagmi-config.ts: chains, connectors and transports. Edit it to match your app.components/web3-provider.tsx:WagmiProviderand a TanStackQueryClientProvider.
Wrap your app once:
import { Web3Provider } from "@/components/web3-provider";
export function App() { return <Web3Provider>{/* your app */}</Web3Provider>;}Optionally, register the config type so wagmi hooks infer your chain IDs:
declare module "wagmi" { interface Register { config: typeof config; }}If you already have a wagmi setup, skip this step. Every 0xui component reads from whatever WagmiProvider is above it.
4. Add components
Section titled “4. Add components”npx shadcn@latest add @0xui/chain-selectorpnpm dlx shadcn@latest add @0xui/chain-selectoryarn dlx shadcn@latest add @0xui/chain-selectorbunx --bun shadcn@latest add @0xui/chain-selectorShared helpers (@0xui/0xui-utils, @0xui/use-mounted, …) and shadcn primitives (popover, dialog, …) install automatically as dependencies.
Using an AI agent
Section titled “Using an AI agent”The shadcn MCP server lets agents browse and install from any registry in your components.json, including @0xui:
npx shadcn@latest mcp init