Skip to content

Block 85 of 297

Resource Downloads

Agendas, reports and forms with file type and size spoken to screen reader users.

Puck key
ResourceDownloadsBlock
Export
resourceDownloadsBlock
React component
<ResourceDownloads />
Path
components/puck/resource-downloads-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 document list for agendas, minutes, budgets and forms. Each row shows a small file-shaped badge with the format, the title, an optional one-line description and a date and size line; a linked row is clickable across its full width. Use it wherever people come to a page to grab a file.

  • Board or council meeting agendas and minutes
  • Annual reports, budgets and audited financials
  • Downloadable applications and permit forms
Writing the content
  • Add 1 to 30 Documents. Past a dozen, split them into blocks by year or type.
  • Always fill File size for downloads, such as 2.4 MB. It helps people on slow or metered connections decide before they tap.
  • Choose Web link as the File type for pages. The badge reads LINK, size is ignored and the icon becomes an arrow.
  • Use the Date field for wording people need, like "Posted Oct 9, 2026". Description is optional and hides when blank.
Accessibility
  • Each file link carries hidden text with its format and size, such as "(PDF, 412 KB)", so screen reader users know what they'll get before opening it.
  • File type is written as text in the badge, which is hidden from assistive tech to avoid repeating it.
  • The whole row is one link with a focus outline around it (WCAG 2.4.7).
Customizing the code
  • Badge colors are bg-indigo-50 and text-indigo-800 for files and neutral for links. Change the indigo- classes to match your brand.
  • To add a file type, extend the FileType union and the fileType select options; the badge prints the value as written.

Editor fields

What content editors see in the P1 sidebar when they select this block.

  • Headingtext
  • Heading levelselect
  • Introtextarea
  • Documentsarray