Installation
Get up and running with RainbowKit
Install
Install RainbowKit and its peer dependencies, wagmi and ethers.
Import
Import RainbowKit, wagmi, and ethers.
Configure
Configure your desired chains and generate the required connectors. You will also need to setup a wagmi
client.
Read more about configuring chains & providers with wagmi
.
Wrap providers
Wrap your application with RainbowKitProvider
and WagmiConfig
.
Then, in your app, import and render the ConnectButton
component.
You're done! RainbowKit will now handle your user's wallet selection, display wallet/transaction information and handle network/wallet switching.
Add your own functionality
Now that your users can connect their wallets, you can start building out the rest of your app using wagmi.
Send transactions, interact with contracts, resolve ENS details and much more with wagmi’s comprehensive suite of React Hooks.
For more detail, view the wagmi documentation.
Further examples
To see some running examples of RainbowKit, or even use them to automatically scaffold a new project, check out the official rainbowkit-examples repository.
To try RainbowKit directly in your browser, check out the CodeSandbox links below:
- with Create React App
- with Create React App (TypeScript)
- with Next.js