Skip to content

Block 205 of 297

Library Card

Get a library card: who's eligible, what to bring, what a card unlocks, an apply link and an illustrated card.

Puck key
LibraryCardBlock
Export
libraryCardBlock
React component
<LibraryCard />
Path
components/puck/library-card-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 "get a library card" section with eligibility, a what-to-bring checklist and an apply button on the left, and a tilted illustrated card with an icon list of benefits on the right. It works as the main sign-up pitch on a library site. On phones the illustrated card and benefits follow the application details in one column.

  • A library's "Get a card" page
  • A home page section aimed at new residents
  • A back-to-school campaign for student cards
Writing the content
  • Who can get a card hides that column when blank. Write it as one plain paragraph covering residency and age rules.
  • What to bring takes up to six items; name acceptable documents with examples, like "a lease, utility bill or piece of mail".
  • What a card gets you holds up to eight benefits, each with one of six icons. Keep each Description to one short sentence.
  • Name on illustrated card prints on the graphic only. The card number and barcode on it are fixed placeholders, not real data.
Accessibility
  • The illustrated card is decorative and hidden from screen readers in full, so nothing printed on it is announced (WCAG 1.1.1).
  • Subheadings for eligibility, what to bring and benefits step down from the Heading level setting (WCAG 1.3.1).
  • The apply button is 48px tall and the second link 44px, both with visible focus outlines; the card's straighten-on-hover effect only runs when reduced motion is not requested.
Customizing the code
  • The card face is bg-indigo-700 with a bg-indigo-100 card behind it; change those classes and the -rotate-3 and rotate-6 values to restyle the graphic.

Editor fields

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

  • Eyebrowtext
  • Headingtext
  • Heading levelselect
  • Introtextarea
  • Eligibility headingtext
  • Who can get a cardtextarea
  • What to bring headingtext
  • What to bringarray
  • Benefits headingtext
  • What a card gets youarray
  • Apply button texttext
  • Apply linktext
  • Second link texttext
  • Second linktext
  • Name on illustrated cardtext
  • Tagline on illustrated cardtext