Block 134 of 297
Needs Wishlist
In-kind needs sorted urgent first with labeled status, drop-off address and hours, and a wishlist link.
- Puck key
- NeedsWishlistBlock
- Export
- needsWishlistBlock
- React component
- <NeedsWishlist />
- Path
- components/puck/needs-wishlist-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 current-needs list for in-kind donations that sorts items into three groups: urgent, always welcome and fully stocked. Urgent items appear first as highlighted cards in two columns; the others follow as compact rows with status badges. A drop-off panel with address, hours, a note and an online wishlist button sits to the right on desktop and below on phones.
- A food pantry or shelter page listing what to donate this week
- A school supply or coat drive page
- A seasonal donation page that thanks donors when an item is covered
Writing the content
- Set Urgency for each item; grouping is automatic. Stocked keeps an item visible as a thank-you instead of deleting it.
- Update the Last updated line whenever the list changes so donors can tell it is current. The block takes 1 to 30 items.
- The drop-off panel appears if address, hours, note or wishlist link text is filled. Enter address and hours one line per row.
Accessibility
- Each urgency group has a heading one level below the block heading, and every item carries a text badge (Urgent, Needed, Stocked), so status is not color alone (WCAG 1.4.1).
- The address uses an address element inside a description list whose visually hidden terms (Address, Hours) stand in for the icons.
- The wishlist button has a 48px minimum height and a visible focus outline.
Customizing the code
- Group titles and badge colors (red, amber, emerald) are set in the groups array at the top of the file.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtext
- Heading levelselect
- Introtextarea
- Last updatedtext
- Itemsarray
- Drop-off headingtext
- Drop-off addresstextarea
- Drop-off hourstextarea
- Drop-off notetextarea
- Wishlist link texttext
- Wishlist linktext