Block 93 of 297
Header — Nonprofit
Deep indigo header with a Donate button that stays visible on the smallest phones and a secondary call to action for the people you serve.
- Puck key
- HeaderDonateBlock
- Export
- headerDonateBlock
- React component
- <HeaderDonate />
- Path
- components/puck/header-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 dark indigo header built around giving. A white Donate button stays visible at every screen size, and an outlined secondary button points the people you serve to help. On phones the secondary action leads the menu panel and the menu toggle shrinks to an icon.
- Shelters, food banks and crisis services that serve clients and donors on one site
- Small nonprofits whose main conversion is a donation
- Year-end or campaign periods when giving needs to stay one tap away
Writing the content
- Keep Donate button text to one word. It never collapses into the menu, so long labels crowd small phones.
- Use Secondary button text for the people you serve, such as "Get help now". It shows from tablet width up and leads the phone menu.
- Use a white or light logo for Logo image URL, since the background is dark. Without one, a building icon appears.
- Menu links allows up to 6. Set Current section to highlight the active one.
Accessibility
- White focus outlines stay visible on the dark background (WCAG 2.4.7), and controls keep a 44px minimum size.
- On the smallest screens the menu toggle shows only an icon but keeps its label as visually hidden text, so it still has an accessible name (WCAG 4.1.2).
- The Donate button's hover lift is turned off with motion-reduce:transform-none, and the active link carries aria-current="page".
Customizing the code
- The header color is bg-indigo-950 with indigo-100 link text. Change both together to keep contrast.
- The heart icon is the heart constant near the top; delete it from the Donate link to drop the icon.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Organization nametext
- Logo image URLtext
- Logo alt texttext
- Logo linktext
- Navigation nametext
- Menu linksarray
- Current sectiontext
- Secondary button texttext
- Secondary button linktext
- Donate button texttext
- Donate button linktext
- Mobile menu labeltext