shadcn.io is not affiliated with official shadcn/ui
Sitemap Tree Footer Block for Svelte
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 Svelte with Ark 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.