Skip to the playground

Made to order

Playground

Build your tip button and copy the code. Everything here changes the real button on this page: look for it in the corner, and scroll to the footer to watch it step aside.

Examples

Try one to put it in the corner of this page. The arrow takes it down to the builder, where you can change anything.

Build your own

Four tabs of options. The code beside them keeps up as you go.

Opens
Position

Fades out while your footer is on screen, so it never covers the footer’s own links.

Visitors keep their place on your site, and screen readers hear “opens in a new tab”.

Use it

The code for the button above. Only what you changed from the defaults is written out.

import { mount } from 'tipjar';
import 'tipjar/style.css';

mount({
  href: 'https://ko-fi.com/mtblck',
  description: 'Matt Black\'s work on Ko-fi',
  icon: 'coffee',
  iconStyle: 'pixel',
  newTab: true,
  hideWhenVisible: 'footer',
});

Colors and the icon’s size go in your stylesheet, not in the call, so the button works under a strict content security policy.

New in 2.3

Ask once

supportPrompt() asks for support one time, once someone has spent a while with your work: from their second visit, after 30 seconds and a quarter of the page, never while they’re typing. Close it and it stays closed. It’s opt-in, and a separate stylesheet, so the button costs nothing extra without it.

Shows as

A card leaves the page usable. A modal holds focus until it’s closed.

Corner
import { supportPrompt } from 'tipjar';
import 'tipjar/style.css';
import 'tipjar/prompt.css';

supportPrompt({
  links: [
    { href: 'https://ko-fi.com/you', label: 'Buy me a coffee', icon: 'coffee' },
    { href: 'https://github.com/you/project', label: 'Star it on GitHub', icon: 'star' },
  ],
});

When it shows is yours to set: delay, scroll, pageViews and cooldownDays are in the API reference.