Skip to content
wyllet
  • Docs
  • Features
  • Playground
  • Blog
  • Docs
  • Features
  • Playground
  • Blog
  • Compare
  • Changelog
GitHub @wylletdevnpm Support
esc
  • IntroductionWhat Wyllet is, what it includes, and how it fits into a wagmi + viem dApp.
  • InstallationInstall Wyllet and its peer dependencies, and enable WalletConnect.
  • Quick startAdd a working connect button to a React dApp in a few minutes.
  • Next.jsUse Wyllet with the Next.js App Router, server components and SSR.
  • Build with AI assistantsGive Cursor, Claude Code, Copilot or ChatGPT the Wyllet docs and the rules for a correct integration.
  • ConfigurationCreate a wagmi config with getDefaultConfig: app info, chains, transports and wallets.
  • WylletProviderEvery WylletProvider prop: theme, appearance, tokens, auth, messages and callbacks.
  • WylletButtonThe Island button, its display options, and building your own trigger with useWylletButton.
Overview

Getting started

  • Introduction
  • Installation
  • Quick start
  • Next.js
  • Build with AI assistants

Core concepts

  • Configuration
  • WylletProvider
  • WylletButton
  • Presentations

Customization

  • Theming
  • Class names
  • Translations

Wallets

  • Wallets
  • All wallets
  • WalletConnect

Chains and tokens

  • Chains
  • Tokens

Features

  • Account panel
  • Activity and transactions
  • Toasts
  • Sign-In With Ethereum
  • ConnectGate

Reference

  • Hooks
  • Components
  • Utilities and types

Guides

  • Security
  • Migrate from RainbowKit
  • FAQ
wyllet

The open-source wallet connector for React dApps. Built on wagmi and viem.

MIT licensed. v1.1.0 on npm with provenance.

Product

  • Features
  • Compare
  • Playground
  • Changelog
  • Blog

Docs

  • Quick start
  • Next.js
  • Build with AI
  • Theming
  • Migrate from RainbowKit

Community

  • GitHub
  • X @wylletdev
  • npm
  • Releases
  • Report an issue

Support

  • support@wyllet.dev
  • FAQ
  • Security
  • Report a vulnerability
  • MIT License

For AI agents

  • llms.txt
  • llms-full.txt
  • RSS feed
  • Sitemap

Wallet, network and token names and logos are trademarks of their respective owners and are used only to identify them.

Docs/Getting started

Quick start

Add a working connect button to a React dApp in a few minutes.

View .mdReport a problem

This page builds a minimal app with a working connect button. It assumes you have a React app and have installed Wyllet and its peers.

1. Create a wagmi config

getDefaultConfig() returns a regular wagmi config with wallet discovery, WalletConnect and your wallet list already wired up.

wagmi.ts
import { base, mainnet } from 'viem/chains'
import { getDefaultConfig } from 'wyllet'
 
export const config = getDefaultConfig({
  appName: 'My dApp',
  walletConnectProjectId: 'YOUR_PROJECT_ID', // optional, free at https://cloud.reown.com
  chains: [mainnet, base], // the first chain is the default
})

Leave out walletConnectProjectId if you only need browser extension wallets for now.

2. Add the providers

Wrap your app in wagmi's WagmiProvider, react-query's QueryClientProvider and WylletProvider, in that order. Then render WylletButton anywhere inside.

App.tsx
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { WagmiProvider } from 'wagmi'
import { WylletButton, WylletProvider } from 'wyllet'
import { config } from './wagmi'
 
const queryClient = new QueryClient()
 
export function App() {
  return (
    <WagmiProvider config={config}>
      <QueryClientProvider client={queryClient}>
        <WylletProvider>
          <header>
            <WylletButton />
          </header>
        </WylletProvider>
      </QueryClientProvider>
    </WagmiProvider>
  )
}

That is the whole integration. Styles are injected for you, so there is no CSS import. Clicking the button opens the connect panel. Once connected, the button shows the account, and clicking it opens the account panel.

3. Use wagmi as usual

Wyllet does not wrap wagmi's hooks. Read the connection and send transactions with wagmi directly:

import { useConnection } from 'wagmi'
 
function Greeting() {
  const { address, isConnected } = useConnection()
  return isConnected ? <p>Connected as {address}</p> : null
}

Next steps

Pick a theme

The default theme follows the operating system: Porcelain in light mode and Obsidian in dark mode. Pass a preset with your brand color to change it.

import { obsidianTheme } from 'wyllet'
 
<WylletProvider theme={obsidianTheme({ accentColor: '#C6F432', radius: 'soft' })}>

See Theming.

Choose a presentation

The panel opens as a side drawer by default. Switch to a popover anchored to the button, or a centered modal:

<WylletProvider appearance={{ presentation: 'popover' }}>

See Presentations.

Add a keyboard shortcut

<WylletProvider shortcut="mod+k">

mod is ⌘ on macOS and Ctrl elsewhere. The button shows the shortcut as a hint while disconnected.

Test without a wallet extension

burnerWallet() adds an in-browser wallet whose private key is kept in localStorage. It lets you try the connected state locally without installing anything.

wagmi.ts
import { base, mainnet } from 'viem/chains'
import { burnerWallet, defaultWallets, getDefaultConfig } from 'wyllet'
 
export const config = getDefaultConfig({
  appName: 'My dApp',
  chains: [mainnet, base],
  wallets: [...defaultWallets(), burnerWallet()],
})
Warning

The burner wallet is for development only. Its key is stored unencrypted, and Wyllet logs a console warning when it runs on a non-local host (anything other than addresses like localhost, 127.0.0.1 or a .local or .test domain). Remove it from production builds.

Keep going

  • Next.js if you use the App Router.
  • Configuration for app metadata, RPC transports and wallets.
  • WylletProvider for every provider option.
  • The playground to try options and copy the generated code.
PreviousInstallationNextNext.js

On this page

  • 1. Create a wagmi config
  • 2. Add the providers
  • 3. Use wagmi as usual
  • Next steps
  • Pick a theme
  • Choose a presentation
  • Add a keyboard shortcut
  • Test without a wallet extension
  • Keep going