A Vue component to add the KoFi Button to your Vue apps.
Disclaimer: I'm not working for www.ko-fi.com or am in any other way affiliated with them except for using their service.
I created this component because I wanted to implement their button widget into my Vue apps, but found it difficult to do so.
It looks kind of like this (even though this one is the static version for markdown):
I'm using their CSS with very little tweaks, and of course link to their images. I hope that's cool with them.
npm i -D @linusborg/vue-ko-fi-button
# or
yarn add -D @linusborg/vue-ko-fi-button
- The package's main export is a .vue File containing ES5 code (IE-compatible).
- If you want to use the ES6-version directly, import from
'@linusborg/vue-ko-fi-button/es6/KoFiButton.vue'
The package also comes with a UMD build if you really need to include it with a <script>
element.
<script src="https://unpkg.com/@linusborg/vue-ko-fi-button/umd/VueKoFiButton.umd.min.js"></script>
The component will be avaliable as window.VueKoFiButton
.
<template>
<KoFiButton
username="linusborg"
color="#CCC"
:title="Can I haz coffee plz?"
/>
</template>
<script>
import KoFiButton from '@linusborg/vue-ko-fi-button'
export default {
name: 'YourComponent',
components: {
KoFiButton
}
}
Boring details about this project's dev setup
yarn install
yarn serve
yarn build
yarn lint
yarn test:unit
yarn relase