Block 23 of 297
Glossary
Terms sorted A–Z and grouped by letter, with jump links, cross-references and definition-list markup.
- Puck key
- GlossaryBlock
- Export
- glossaryBlock
- React component
- <Glossary />
- Path
- components/puck/glossary-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 dictionary-style list of terms that the block sorts A to Z and groups under large letter headings. A letter bar of jump links sits on top, sticking to the top of the screen from tablet width up, with unused letters grayed out. Terms can carry an abbreviation and cross-references that link to other entries.
- A plain-language budget or finance glossary for a city
- Program, benefits or health terminology for clients
- A reference page that supports a long guide or report
Writing the content
- Add Terms in any order; the page sorts them alphabetically, ignoring case and accents. Up to 200 are allowed.
- Put abbreviations like CIP or FY in Also called.
- In See also, separate related terms with commas and spell them exactly as their Term entries; only exact matches become links.
- Write each Definition in one or two plain sentences, and use blank lines only when a second paragraph is needed.
Accessibility
- Entries use dl, dt and dd with the term in a dfn element, and each letter is a heading one level below the section heading inside a labeled section (WCAG 1.3.1).
- The letter bar is a named nav; letters with no terms are aria-hidden plain text, not dead links, and the # stop is announced as "Numbers and symbols".
- Letter links are 44px squares with an indigo focus outline, and every group ends with a "Back to letters" link.
Customizing the code
- Letter headings use text-indigo-700 at text-5xl and sm:text-6xl; the sticky bar is sm:sticky sm:top-0, which you may need to offset below a fixed header.
- Jump targets use scroll-mt-28; match it to the bar height plus any site header.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtext
- Heading levelselect
- Introtextarea
- Termsarray