Block 107 of 297
Sitemap Links
An HTML site map listing every section of the site and its pages in columns.
- Puck key
- SitemapLinksBlock
- Export
- sitemapLinksBlock
- React component
- <SitemapLinks />
- Path
- components/puck/sitemap-links-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
An HTML site map that lists every section of the site with its pages underneath, laid out in two, three or four columns on wide screens. Section names can link to their landing pages. Phones always get a single column. It gives people, and search engines, one page that reaches everything.
- The site map page linked from a government or nonprofit footer
- A fallback navigation page for large, older sites
- An index page during a migration, while menus are still changing
Writing the content
- Add 1 to 16 Sections, each with 1 to 30 Pages. Order sections the way they appear in your main menu.
- Fill Section link only when the section has its own landing page; the name then shows an arrow and becomes a link.
- Pick the Columns setting based on section count: 3 suits six sections, 4 suits eight or more.
- Keep page labels identical to the page titles people will see after they click.
Accessibility
- Each section name is a heading one level below the main heading, so screen reader users can jump section by section (WCAG 1.3.1).
- Pages are in plain lists, and the arrow icons on section links are hidden from assistive tech.
- Every link keeps a 44px minimum height and an indigo focus outline. Long labels wrap instead of overflowing on small screens.
Customizing the code
- Column options map to Tailwind classes in the gridCols object; add a "5" entry if you need it.
- Hover color is hover:text-indigo-700 on both section and page links.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtext
- Heading levelselect
- Introtextarea
- Columnsradio
- Sectionsarray