Magoo Component UI logo Magoo Component UI
← Catalog

Tip Jar

tip-jar molecule experimental

A compact card for sending a one-off tip, with preset amount buttons, a custom field, and an optional goal bar.

Also in: Cards

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default

Support Ava Rivera

$320 raised Goal $500
NoGoal

Support Ava Rivera

$320 raised Goal $500

Props

NameTypeReq
creator string
amounts array ✓
goal string
raised string
pct string

Related components

How to use

behavior.js wires interaction: clicking a preset selects it exclusively (data-selected drives the fill) and clears the custom field; typing a custom amount deselects the presets; Send tip dispatches a bubbling tip:send CustomEvent whose detail.amount is the custom value when present, otherwise the selected preset. The goal bar is pure CSS driven by the precomputed pct, so it renders without JavaScript. The portable self-init reads state from the DOM; no props are passed.

Use cases

cardhighlight WCAG AA SEO 30 dir: both ai-generated