☕ Tip Jar — demos

One <script> tag, three placements, a JS API. Each demo is a plain host page.

Inline →Renders where the tag sits Floating →Fixed corner button + popover Modal →Trigger opens a dialog JS API →render() / open() / close()

The one-tag embed

<script src="https://tipjar.bilalhasson.com/widget.js"
        data-creator="Bilal"
        data-currency="gbp"
        data-amounts="3,5,10"
        data-placement="inline"></script>

Configuration (data attributes)

AttributeDefaultPurpose
data-creatorName in the header + attached to the tip
data-currencygbpISO code; drives Intl formatting
data-amounts3,5,10Preset amounts (decimals allowed)
data-placementinlineinline · floating · modal
data-positionbottom-rightFloating only: bottom-right/bottom-left
data-color#6366f1Accent colour
data-avatarEmoji or image URL
data-titleBuy {creator} a coffeeHeader copy
data-themeautoauto/light/dark
data-autotrueSet false to skip auto-init (drive via JS API)

Test card: 4242 4242 4242 4242, any future expiry, any CVC/postcode.

← home