Block 10 of 297
Donate Hero
Mission line beside a no-JS donation form with preset amount cards, an other-amount field and one-time or monthly choice.
- Puck key
- HeroDonateBlock
- Export
- heroDonateBlock
- React component
- <HeroDonate />
- Path
- components/puck/hero-donate-block.tsx
- Dependencies
- None
- 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 giving page opener: the mission line, body and a proof point on the left, and a dark donation card on the right with a one-time or monthly toggle, two to six preset amounts with impact notes, and an other-amount field. It posts straight to your payment processor without JavaScript. The optional photo under the copy appears only on large screens.
- The main donate page for a nonprofit or foundation
- Year-end or giving day campaign pages
- A monthly giving or sustainer program page
Writing the content
- Match Amount field name, Other amount field name and Frequency field name to your processor. Frequency is sent as once or monthly; confirm it prefers the typed amount when both arrive.
- Enter Preset amounts as numbers only, lowest first; the first one starts selected. Four amounts fill two even rows.
- Keep What it does to a few concrete words that match your real program costs.
- Give the Proof line a named source, such as audited financials; the default figure is sample copy.
Accessibility
- Frequency and amount choices are native radio buttons grouped in fieldsets with legends, so they work with arrow keys and announce their group (WCAG 1.3.1, 2.1.1).
- The radios are visually hidden but their card labels show a focus outline when a radio has keyboard focus (WCAG 2.4.7), and the selected card changes fill, not only text color.
- The other-amount input has a visible label and numeric keyboard hint; the Form title names the form via aria-labelledby.
Customizing the code
- The card is bg-neutral-950 with indigo-600 for the selected amount and submit button; change those to rebrand.
- The other-amount pattern attribute allows two decimals; tighten it if your processor needs whole numbers.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Eyebrowtext
- Mission linetextarea
- Heading levelselect
- Bodytextarea
- Proof linetext
- Image URLtext
- Image alt texttext
- Form titletext
- Form action URLtext
- Currency symboltext
- Amount field nametext
- Other amount field nametext
- Frequency field nametext
- Preset amountsarray
- Starts selectedradio
- One-time labeltext
- Monthly labeltext
- Other amount labeltext
- Button texttext
- Security notetext