Skip to content

Block 204 of 297

New Arrivals

A shelf of new titles with covers, authors and format badges that swipes sideways on phones and links to the catalog.

Puck key
NewArrivalsBlock
Export
newArrivalsBlock
React component
<NewArrivals />
Path
components/puck/new-arrivals-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 shelf of new titles shown as book covers with format badge, title and author, each linking to its catalog record. On phones and tablets the shelf scrolls sideways with snap points; on desktop it becomes a six-column grid. Titles without a cover image get a typeset cover in one of four colors.

  • A library home page "New this month" section
  • A staff picks or themed display page
  • A teen or children's page highlighting recent additions
Writing the content
  • Titles takes 1 to 16 entries. Six fill one desktop row, so use multiples of six for even rows.
  • Leave Cover image URL blank to get a typeset cover with the title and author; pick its Typeset cover color to vary the shelf.
  • Cover alt text is usually best left blank, because the title is already read out. Only describe a cover when it adds something the title doesn't.
Accessibility
  • The scrolling shelf is a labeled region that can take keyboard focus, so keyboard users can scroll it with arrow keys (WCAG 2.1.1).
  • Each title link stretches over the whole card while its accessible name stays the title, and the focus outline is drawn around the card (WCAG 2.4.7).
  • Typeset covers are hidden from screen readers to avoid reading the title twice, the format badge has a hidden "Format:" prefix, and the cover lift on hover is turned off for reduced-motion users.
Customizing the code
  • Change lg:grid-cols-6 for a different desktop column count, and w-40 sm:w-44 on each item for card width on the scrolling shelf.

Editor fields

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

  • Headingtext
  • Heading levelselect
  • Introtextarea
  • See all link texttext
  • See all linktext
  • Titlesarray