Block 275 of 297
Liquid Progress
A fundraising meter: a vessel filled to your goal with a live GPU liquid surface, bindable totals and full ARIA.
- Puck key
- LiquidProgressBlock
- Export
- liquidProgressBlock
- React component
- <LiquidProgress />
- Files
- components/puck/liquid-progress-block.tsx
- components/puck/liquid-progress.client.tsx
- Dependencies
- vgpu
- License
- MIT
About this block
When to use it, how to write for it, and what to change in the code.
What it's for
A fundraising meter that pairs campaign copy, the amount raised and a short stats row with a tall glass vessel filled to the share of the goal reached. The liquid surface moves, shimmers and carries rising bubbles. On large screens the vessel sits to the right of the copy; on phones it drops below at a narrower width.
- A donation campaign page with a fixed dollar goal and deadline
- Matching-gift drives where momentum matters
- Capital campaigns or volunteer-hour goals shown in plain numbers
Writing the content
- Amount raised and Goal take numbers; commas and symbols are stripped, so you can bind them to a P1 data source with {{ source.field }} tokens.
- The Funded percent is not capped, so it can read 112% after you pass the goal, while the vessel stops at full.
- Currency symbol prints before both amounts. Leave it blank for non-money goals such as hours or trees.
- Donors, Deadline and Button text each hide when blank.
Accessibility
- The vessel is a role="progressbar" labelled by the heading, with aria-valuenow, aria-valuemax and a text value such as "$48,250 of $75,000 · 64%" (WCAG 4.1.2).
- The same summary is printed as a visible caption, and all figures are text, not pixels.
- The liquid canvas is aria-hidden; reduced motion gives a still frame and the loop stops off screen.
Customizing the code
- Requires vgpu and liquid-progress.client.tsx. Wave height comes from the 0.020 and 0.022 amplitudes in fs_main, and the bubble count is the 10 in the bubble loop.
- The button and eyebrow use Tailwind indigo; vessel height is set by h-80 sm:h-96 lg:h-[28rem].
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Eyebrowtext
- Headingtextarea
- Heading levelselect
- Bodytextarea
- Amount raisedtext
- Goaltext
- Currency symboltext
- Donorstext
- Deadlinetext
- Button texttext
- Button linktext
- Liquid colortext
- Vessel colortext
- Motionradio