shadcn.io is not affiliated with official shadcn/ui
Sitemap Tree Footer Block for React
A sitemap footer drawn as three trees: nested lists with hairline connectors, a root link for each section, pages indented under it and some with their own children.
Installation
Overview
A sitemap footer for React with Base UI, drawn as a map. A lean band holds the wordmark, one sentence and the page count. Under it, a nav labelled Footer holds three trees (Product, Learn, Company) side by side behind split dividers that run from the top rule to the legal band, with a + where they meet it. Each tree is real nested lists: a root link as the heading, its pages indented under a vertical hairline with an elbow into each one, and some pages with children of their own, three levels in all. Every node is a link. The page's rails and top rule come from the Guides spine. On a phone the trees stack, ruled between. It's built from Guides, plain nested lists and your theme's tokens, with no JavaScript.
FAQ
How do I change the tree?
Edit TREES at the top of the file: a tree is a root (href, label) with its children; each child is a page with its own children, which may be empty. Three levels is the depth the markup draws; a fourth level would need one more nested list in the component. The page count in the brand band is worked out from the data.
How are the connectors drawn?
Each node is a list item with two pseudo-elements: a vertical hairline along its start edge that runs the item's full height (so it carries on past the item's own children) and a short elbow into the label. The last item in a list stops its vertical line at the elbow. They use logical properties, so in a right-to-left page the tree mirrors: lines on the right, elbows pointing left. No images or SVG are involved.
Is it a real tree for assistive technology?
It is nested ul lists, so a screen reader announces the list's size and each nested level ("list, 3 items", "nested"), and every node is a link in the tab order. It deliberately isn't an ARIA tree widget: that would hide the links behind a single tab stop and arrow-key navigation, which suits an app and not a footer of plain links. The root of each tree is a link inside an h2, so you can also jump by heading.
Related
- Pro
Sitemap Filter Footer
Sitemaps and trailsA sitemap footer for a documentation host: a search field that filters 36 links across six columns as you type, with a live count and a clear button.
- Pro
Mega Footer
Link gridsA mega footer for a cloud platform: a brand band, eight link groups with icons in two ruled bands of four on one desktop screen, an accordion on phones, and a legal band.
- Pro
Breadcrumb Footer
Sitemaps and trailsA breadcrumb footer for a CI service's docs: a trail band ending on the current page, three link groups in hairline columns and a foot band with the wordmark and policies.
- Pro
Link Columns Footer
Link gridsThe classic link-column footer for an email API: a brand column with the wordmark, one sentence and four social links, four groups of links behind a split divider, and a legal band with the copyright and the policy links.
- Pro
Animated Links Footer
Link gridsA link footer for a project planner: three columns of six links under ruled headings, each link sliding an arrow in from its start on hover and focus, and a foot band with the brand and legal links.
- Pro
Hairline Cells Link Directory Footer
Link gridsA brandless link directory: six groups of five links as cells on shared hairlines, three across by two down, with a legal band under the grid.