2.1.0 • Published 6 months ago

kofi-react-widget v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

kofi-react-widget

React floating button component to accept donations to your Ko-fi account without leaving your app. Works on both Next.js and pure React apps, but check out how to use it below because, for now, it's a bit different for each of them. Check below for examples.

Usage

In a Nextjs app

Import KofiFloatingButton from kofi-react-widget

import { KofiFloatingButton } from "kofi-react-widget";

export default YourComponent() {
    ...
    return (
    ...
    <KofiFloatingButton username="rodribuilds" background="#fbbf24" textColor="#323842" text="Coffee?" />
    )
}

In a React app

Import KofiFloatingButtonReact from kofi-react-widget

import { KofiFloatingButtonReact } from "kofi-react-widget";

...

function App() {
    <KofiFloatingButtonReact username="rodribuilds" background="#fbbf24" textColor="#323842" text="Coffee?" />
    ...
}

Props

NameDescriptionTypeRequiredDefault
usernameYour Ko-fi usernamestringtrue---
textButton textstringfalse
backgroundButton background color (HEX value)stringfalse#00b9fe
textColorButton text color (HEX value)stringfalse.#FFF

Examples

You can see a working example here.

npm.io npm.io npm.io

npm.io

2.1.0

6 months ago

2.0.1

6 months ago

1.1.1

7 months ago

1.1.0

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago