Installation
If you prefer referring to a video tutorial for this, please click here.Set up Reown AppKit using AI
If you’re using Cursor IDE (or another AI based IDE) to build a project with Reown AppKit, Reown provides a.mdc
file that enhances your development experience. The reown-appkit.mdc
file here contains Cursor-specific rules and type hints for Reown AppKit.
To use it in your project:
- Copy the
reown-appkit.mdc
file from this repository - Create a
.cursor/rules
folder in your project’s root directory (if it doesn’t exist) - Place the
.mdc
file in your project’s.cursor/rules
folder
AppKit CLI
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.- Project Name: Enter the name for your project.
- Framework: Select your preferred framework or library. Currently, you have three options: React, Next.js, and Vue.
- Network-Specific libraries: Choose whether you want to install Wagmi, Ethers, Solana, or Multichain (EVM + Solana).
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.
Custom Installation
If you are setting up your React app, please do not use
npx create-react-app
, as it has been deprecated. Using it may cause dependency
issues. Instead, please use
Vite to
create your React app. You can set it up by running npm create vite@latest
.Cloud Configuration
Create a new project on Reown Dashboard at https://dashboard.reown.com and obtain a new project ID.Implementation
wagmi Example
Check the React wagmi example
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 transportOn top of your app set up the following configuration, making sure that all functions are called outside any React component to avoid unwanted rerenders.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.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 hooks.
In this example we are going to use the Learn more about the AppKit web components here
<appkit-button>
component.Web components are global html elements that don’t require importing.Smart Contract Interaction
Wagmi hooks can help us interact with wallets and smart contracts:Read more about Wagmi hooks for smart contract interaction here.