Skip to main content
AppKit provides seamless integration with multiple blockchain ecosystems. It supports Wagmi and Ethers v6 on Ethereum, @solana/web3.js on Solana, as well as Bitcoin, TON, TRON and other networks.
We recommend using Vite to get started with AppKit JavaScript.

Installation

Try installing AppKit Skills to get AI-assisted guidance. Your AI coding assistant can help you set up, build, and debug your AppKit integration. To install AppKit Skills, run the following command in your terminal:
npx skills add https://github.com/reown-com/skills --skill appkit --agent '*'
After installation, you can ask your AI assistant for help with AppKit setup, implementation, and troubleshooting.

Custom Installation

npm install @reown/appkit @reown/appkit-adapter-wagmi wagmi viem

Cloud Configuration

Create a new project on Reown Dashboard and obtain a new project ID.

Don't have a project ID?

Head over to Reown Dashboard and create a new project.

Implementation

wagmi Example

Check the JavaScript wagmi example
For a quick integration, you can use the createAppKit function with a unified configuration. This automatically applies the predefined configurations for different adapters like Wagmi, Ethers, or Solana, so you no longer need to manually configure each one individually. Simply pass the common parameters such as projectId, chains, metadata, etc., and the function will handle the adapter-specific configurations under the hood.This includes WalletConnect, Coinbase and Injected connectors, and the Blockchain API as a transportIn your main.js file set up the following configuration.
import { createAppKit } from '@reown/appkit'
import { mainnet, arbitrum } from '@reown/appkit/networks'
import { WagmiAdapter } from '@reown/appkit-adapter-wagmi'

// 1. Get a project ID at https://dashboard.reown.com
const projectId = 'YOUR_PROJECT_ID'

export const networks = [mainnet, arbitrum]

// 2. Set up Wagmi adapter
const wagmiAdapter = new WagmiAdapter({
  projectId,
  networks
})

// 3. Configure the metadata
const metadata = {
  name: 'AppKit',
  description: 'AppKit Example',
  url: 'https://example.com', // origin must match your domain & subdomain
  icons: ['https://avatars.githubusercontent.com/u/179229932']
}

// 3. Create the modal
const modal = createAppKit({
  adapters: [wagmiAdapter],
  networks: [mainnet, arbitrum],
  metadata,
  projectId,
  features: {
    analytics: true // Optional - defaults to your Cloud configuration
  }
})

// 4. Trigger modal programaticaly
const openConnectModalBtn = document.getElementById('open-connect-modal')
const openNetworkModalBtn = document.getElementById('open-network-modal')

openConnectModalBtn.addEventListener('click', () => modal.open())
openNetworkModalBtn.addEventListener('click', () => modal.open({ view: 'Networks' }))

// 5. Alternatively use w3m component buttons within the index.html file

Importing networks

Reown AppKit use Viem networks under the hood, which provide a wide variety of networks for EVM chains. You can find all the networks supported by Viem within the @reown/appkit/networks path.
import { createAppKit } from '@reown/appkit'
import { mainnet, arbitrum, base, scroll, polygon } from '@reown/appkit/networks'
Looking to add a custom network? Check out the custom networks section.

Trigger the modal

To open AppKit you can use our web component or build your own button with AppKit actions.
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>HTML AppKit Example</title>
  </head>
  <body>
    <appkit-button />
    <script type="module" src="main.js"></script>
  </body>
</html>

Blockchain Interaction

You need to install @wagmi/core to interact with smart contracts:
npm install @wagmi/core
Wagmi actions can help us interact with wallets and smart contracts:For this use case, we need to import the wagmiConfigfrom our AppKit WagmiAdapter configuration.
import { readContract } from '@wagmi/core'
import { USDTAbi } from '../abi/USDTAbi'

const USDTAddress = '0x...'

const data = readContract(wagmiConfig, {
  address: USDTAddress,
  abi: USDTAbi,
  functionName: 'totalSupply',
  args: []
})
Read more about Wagmi actions for smart contract interaction here.

Alternative Installation

If you are starting from scratch, you can use the following methods to set up your project with Reown AppKit.
AppKit Skills provide AI-powered assistance for building with Reown AppKit. Once installed, your AI coding assistant can help you set up, build, and debug your AppKit integration.To install AppKit Skills, run the following command in your terminal:
npx skills add https://github.com/reown-com/skills --skill appkit --agent '*'
After installation, you can ask your AI assistant for help with AppKit setup, implementation, and troubleshooting.
Reown offers a dedicated CLI to set up a minimal version of AppKit in the easiest and quickest way possible.To do this, please run the command below.
npx @reown/appkit-cli
After running the command, you will be prompted to confirm the installation of the CLI. Upon your confirmation, the CLI will request the following details:
  1. Project Name: Enter the name for your project.
  2. Framework: Select your preferred framework or library. Currently, you have three options: React, Next.js, and Vue.
  3. Network-Specific libraries: Choose whether you want to install Wagmi, Ethers, Solana, or Multichain (EVM + Solana).
After providing the project name and selecting your preferences, the CLI will install a minimal example of AppKit with your preferred blockchain library. The example will be pre-configured with a projectId that will only work on localhost.To fully configure your project, please obtain a projectId from the Reown Dashboard and update your project accordingly.Refer to this section for more information.