This is a simple port from https://github.com/MetaMask/TipButton, you can use metamask tip button without any css selector like official.
npm install vue-metamask-tip --savein main.js
import Vue from 'vue';
import MetamaskTipButton from 'vue-metamask-tip';
import App from './App.vue';
import 'vue-metamask-tip/dist/vue-metamask-tip.css';
new Vue({
el: '#app',
components: {
MetamaskTipButton
},
render: h => h(App),
});in index.vue
<template>
<div>
<MetamaskTipButton
address="0x32Be343B94f860124dC4fEe278FDCBD38C102D88"
amount="1"
type="1"
></MetamaskTipButton>
</div>
</template>| Name | Type | Default | Description |
|---|---|---|---|
| amount | String | ETH amount, use string to prevent float precision issue | |
| address | String | Receiver ETH wallet | |
| type | String | 1 | MetaMask button type |
| callback | String | This component will post {"hash": "<ID>"} to this url |