use-rainbowkit-vue
A vue plugin for rainbowkit. (Not official) Based on @wagmi/vue
2,605
5
| Install | |
|---|---|
npm install use-rainbowkit-vue |
|
| Latest Version: | 0.4.6 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Aug 9, 2024 |
| Links: | GitHub · npm |
Maintainer: siangtoon91
Rainbowkit Vue Plugin
A vue plugin for rainbowkit. (Not official) Based on @wagmi/vue
Installation
Install rainbowkit-vue and its wagmi vue, viem peer dependencies.
npm install @wagmi/vue viem @tanstack/vue-query use-rainbowkit-vue
Setup
If found error such as buffer not defined or any node module not defined, install or setup polyfill.
import { createApp } from 'vue'
import {
RainbowKitVuePlugin,
mainnet,
zkSync,
scroll,
polygonZkEvm,
immutableZkEvm,
avalanche
} from 'use-rainbowkit-vue'
import 'use-rainbowkit-vue/style.css';
///All options are optional, except 'appName', 'projectId' and 'chains' options.
createApp(App).use(RainbowKitVuePlugin,{
appName: 'RainbowKit demo',
projectId: "YOUR_PROJECT_ID",
chains: [
mainnet,
zkSync,
scroll,
polygonZkEvm,
immutableZkEvm,
avalanche
],
///Extra options
enableChainModalOnConnect: false, /// by default is true
connectModalTeleportTarget: '#rainbowkit-modal', /// Make sure this element exists
chainModalTeleportTarget: '#rainbowkit-modal', /// Make sure this element exists
accountModalTeleportTarget: "#rainbowkit-modal", /// Make sure this element exists
currencyAddress: '0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce',
connectModalIntro: (/*{ compactModalEnabled, getWallet }*/)=>{
return ()=>{
return h('div','You can start your journey here by using web3 wallet.');
}
},
})
Use of Rainbowkit Components with <script setup>
<script lang="ts" setup>
import { RainbowKitProvider, ConnectButton } from "use-rainbowkit-vue";
</script>
<template>
<div class="content">
<RainbowKitProvider>
<ConnectButton />
</RainbowKitProvider>
</div>
</template>
Credits
License
Licensed under the MIT License.
Related Packages
web3-token
Web3 Token is a new way to authenticate users in hybrid dApps using signed messa...
81,222
368
chain-syncer
chain-syncer is a JS module which allows you to synchronize your app with any et...
8,621
25
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.4.6 | >=3 | MIT | |
| 0.4.5 | >=3 | MIT | |
| 0.4.4 | >=3 | MIT | |
| 0.4.3 | >=3 | MIT | |
| 0.4.2 | >=3 | MIT | |
| 0.4.1 | >=3 | MIT | |
| 0.4.0 | >=3 | MIT | |
| 0.3.0 | >=3 | ||
| 0.2.3 | >=3 | ||
| 0.2.2 | >=3 | ||
| 0.2.1 | >=3 | ||
| 0.2.0 | >=3 | ||
| 0.1.0 | >=3 | ||
| 0.0.4 | >=3 | ||
| 0.0.3 | >=3 | ||
| 0.0.2 | >=3 | ||
| 0.0.1 | >=3 |