Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
Information architecture visualization with two modes — an interactive tree with expand/collapse, or a visual org-chart with boxed nodes and connectors.
A web component that progressively enhances a nested <nav> with <ul>/<li> structure into an information architecture visualization. Without JavaScript, the nested list renders as a readable site structure. With JavaScript, two view modes are available:
data-view="visual") — org-chart-style boxed nodes with color-coded borders, connectors, and branch splittingBoth modes use the exact same HTML source.
The default view renders an indented, collapsible tree. Nodes show page-type and template badges, status dots, and tree connector lines.
<site-map-wc title="Taskflow Architecture"> <nav> <ul> <li data-page-type="layout" data-template="app-shell"> <a href="/">Home</a> <ul> <li data-page-type="dashboard" data-template="two-column"> <a href="/dashboard">Dashboard</a> <ul> <li data-page-type="page"><a href="/dashboard/project">Project Detail</a></li> <li data-page-type="page"><a href="/dashboard/tasks">Task List</a></li> </ul> </li> <li data-page-type="section" data-template="sidebar"> <a href="/reports">Reports</a> </li> <li data-page-type="page" data-template="settings"> <a href="/settings">Settings</a> </li> </ul> </li> </ul> </nav></site-map-wc>
Add data-view="visual" to render the same HTML as a flow-diagram-style org chart with color-coded boxed nodes, connectors, and branch splitting. Each page type gets a distinct border color and badge. The original <nav> is preserved (hidden) for screen reader access.
<site-map-wc title="Taskflow Architecture" data-view="visual"> <nav> <ul> <li data-page-type="layout" data-template="app-shell"> <a href="/">Home</a> <ul> <li data-page-type="dashboard" data-template="two-column"> <a href="/dashboard">Dashboard</a> <!-- children branch visually --> </li> <li data-page-type="section" data-template="sidebar"> <a href="/reports">Reports</a> </li> <li data-page-type="page" data-template="settings"> <a href="/settings">Settings</a> </li> </ul> </li> </ul> </nav></site-map-wc>
The two modes use identical HTML — switch between them by toggling the data-view attribute. This makes it easy to offer a "toggle view" button in your UI.
| Attribute | Type | Default | Description |
|---|---|---|---|
title | string | — | Site map heading |
src | string (URL) | — | JSON data URL |
data-view | string | — | Set to "visual" for org-chart mode. Omit for tree mode. |
collapsed | boolean | — | Start all nodes collapsed (tree mode only) |
compact | boolean | — | Reduced spacing (both modes) |
Each <li> in the tree carries these data attributes, used by both view modes:
| Attribute | Type | Description |
|---|---|---|
data-page-type | string | layout, section, dashboard, page, modal, redirect |
data-template | string | Template or view name (shown as badge) |
data-status | string | draft, ready, live, deprecated |
Page types determine badge color in tree mode and border/background color in visual mode.
| Type | Color | Use Case |
|---|---|---|
layout | Purple | App shell, root layout wrapper |
section | Blue | Navigation section grouping child pages |
dashboard | Green | Data-heavy overview page |
page | Gray | Standard content page |
modal | Amber (dashed border) | Dialog or overlay view |
redirect | Red | URL redirect (no template) |
{ "title": "Site Map", "pages": [ { "label": "Home", "href": "/", "pageType": "layout", "template": "app-shell", "children": [ { "label": "Dashboard", "href": "/dashboard", "pageType": "dashboard", "template": "two-column", "children": [ { "label": "Project Detail", "href": "/dashboard/project", "pageType": "page" } ] } ] } ]}
| Event | Detail | When |
|---|---|---|
site-map-wc:ready | { nodeCount, depth } | After setup (both modes) |
site-map-wc:select | { href, pageType, template } | Node clicked (both modes) |
role="tree" and role="treeitem", roving tabindex, arrow-key traversal, Home/End, Enter/Space.<nav> preserved (hidden) for screen readers.prefers-reduced-motion: reduce<site-map-wc> is deliberately a full role="tree" widget because the use case — exploring and selecting nodes in an information-architecture graph — matches the ARIA tree pattern’s keyboard contract. For ordinary site navigation (docs sidebars, settings menus, nested link lists) the correct pattern is disclosure, not a tree.
Reach for nav.tree / the disclosure tree snippet when you want collapsible groups of links. Reach for <site-map-wc> only when you want the ARIA tree behavior and the IA-visualization layer on top. Don’t retrofit role="tree" onto nav.tree: partial ARIA is worse than none.
nav.tree — disclosure-navigation counterpart for docs sidebars and site menus<flow-diagram> — User flows with decisions and branching (visual mode shares this style)<glossary-wc> — Define terms used in page descriptions<adr-wc> — Document architecture decisions that shape the IA<user-journey> — Map how users navigate the site structure