Sidebar
The dashboard's navigation, down the left of the signed-in shell: a header for the context switcher, groups of rows, and a footer. It folds to a rail of icons.
<Sidebar collapsible="icon"> <SidebarContent> <SidebarGroup> <SidebarGroupContent> <SidebarMenu> <SidebarItem glyph={<House />} label="Home" active /> <SidebarItem glyph={<MagnifyingGlass />} label="Search" end={<Kbd aria-hidden className="ml-auto group-data-[collapsible=icon]:hidden">⌘K</Kbd>} /> </SidebarMenu> </SidebarGroupContent> </SidebarGroup> <SidebarGroup> <SidebarTitle>Build</SidebarTitle> <SidebarGroupContent> <SidebarMenu> <SidebarItem glyph={<Robot />} label="Agents" /> <SidebarItem glyph={<Key />} label="Gateways" /> </SidebarMenu> </SidebarGroupContent> </SidebarGroup> </SidebarContent> <SidebarFooter className="gap-px border-t"> <SidebarMenu> <SidebarItem glyph={<LayoutSidebarLeftDock />} label="Collapse" /> </SidebarMenu> </SidebarFooter></Sidebar>Installation
import {
Sidebar,
SidebarContent,
SidebarFooter,
SidebarGroup,
SidebarGroupContent,
SidebarHeader,
SidebarInset,
SidebarItem,
SidebarMenu,
SidebarProvider,
SidebarTitle,
} from "@catalog-dashboard/components/sidebar";The Sidebar is the dashboard's own component, not a design-system one: shadcn's Sidebar on Base UI, with Dome's row (SidebarItem) and title (SidebarTitle). Its scrolling area is the design system's ScrollArea.
Usage
<SidebarProvider>
<Sidebar collapsible="icon">
<SidebarHeader>…</SidebarHeader>
<SidebarContent>
<SidebarGroup>…</SidebarGroup>
</SidebarContent>
<SidebarFooter>…</SidebarFooter>
</Sidebar>
<SidebarInset>{page}</SidebarInset>
</SidebarProvider>The dashboard's sidebar is fixed to the window. Every picture on this page is the same parts in a box, with collapsible="none".
Anatomy
- 1 · Row. A glyph in a gray tile, then the label. 32px tall. In the dashboard the context switcher sits above the first row.
- 2 · End. What the caller puts after the label: a key, a Preview badge.
- 3 · Count. A red number. A dot on the tile in the rail.
- 4 · Group title. Over the rows it names, small and muted.
- 5 · Active row. A fill and the full text color.
- 6 · Footer. Under a line. In the dashboard: the fold button, then the user menu.
A row
SidebarItem is the only kind of row the nav has: a glyph in a gray tile, then a label. glyph takes any icon element, so an animated icon fits as well as a still one, and plays while the row is hovered or focused.
<SidebarItem glyph={<Robot />} label="Agents" />The current page
active draws a fill and the full text color. The dashboard fills the row whose route the address starts with, and the Dome Assistant row while its rail is open.
<SidebarItem glyph={<House />} label="Home" active /><SidebarItem glyph={<Robot />} label="Agents" />A row that is a link
A row is a button unless render makes it a link. The dashboard's page rows are ScopedLinks, with aria-current on the current one. The picture uses a plain link: ScopedLink needs the dashboard's context.
<SidebarItem glyph={<Robot />} label="Agents" active render={<ScopedLink href="/agents" aria-current="page" />}/>What ends a row
end is drawn after the label: the Search row's key, a Preview badge. The row neither places nor hides it. The caller's ml-auto pushes it to the row's end, and the dashboard adds a class that hides it in the rail; without that class the folded row clips it.
<SidebarItem glyph={<MagnifyingGlass />} label="Search" end={<Kbd aria-hidden className="ml-auto group-data-[collapsible=icon]:hidden">⌘K</Kbd>}/><SidebarItem glyph={<Shield />} label="Guards" end={<PreviewBadge className="ml-auto group-data-[collapsible=icon]:hidden" />}/>A count
count is a red number at the row's end; the one caller is the Dome Assistant's pending items. Unlike end it stays in the rail, as a red dot on the glyph's corner with no digits. The badge is hidden from a screen reader, so the Dome Assistant row also writes the number into its label for one: "Dome Assistant (3 new)".
<SidebarItem glyph={<ChatBubble />} label="Dome Assistant" count="3" />An unavailable row
disabled keeps the row in its place and stops clicks. The dashboard dims it to 40% and uses it for three things: a page your role may not open, a placeholder, and a page that lives in another context. That last one is given the tooltip "Available in workspace context", which, like every row's tooltip, shows only while the sidebar is folded.
<SidebarItem glyph={<Key />} label="Gateways" disabled aria-disabled tooltip="Available in workspace context" className="cursor-default opacity-40"/>Groups
A SidebarGroup is a SidebarTitle over its rows. The dashboard's first group (Home, Search, Dome Assistant, Settings) has no title.
<SidebarGroup> <SidebarTitle>Build</SidebarTitle> <SidebarGroupContent> <SidebarMenu> <SidebarItem glyph={<Robot />} label="Agents" /> <SidebarItem glyph={<Key />} label="Gateways" /> </SidebarMenu> </SidebarGroupContent></SidebarGroup>Collapsed to a rail
collapsible="icon" lets the sidebar fold to a 48px rail. Titles fade out, each row is clipped to its glyph, and a count becomes its dot. A row given a tooltip shows it to its right. ⌘B, or Ctrl B, folds and unfolds it. The two pictures are stills: the same rows at both widths, with no tooltips.
<Sidebar collapsible="icon">…</Sidebar>In the dashboard
The dashboard's navigation
Home, Search, Dome Assistant and Settings with no title, then Build, Run, Connect, Govern and Operate. The footer holds the fold button and the signed-in person's menu. In a workspace, a Getting started card sits above the footer.
components/layout/sidebar.tsx
The context switcher
The sidebar's header: which organization, tenant or workspace you are in. It has its own page.
ds/dashboard/context-switcher.tsx
This catalog's menu
The same parts, with a group per kind of page. A component's row ends in a mark for its doc.
catalog/app/_components/catalog-nav.tsx
Accessibility
Rows are links and buttons in lists, so the Tab key reaches each one in order. There are no arrow keys. The focus ring is drawn on the row.
Folded, a row is clipped to its glyph and keeps its label as its name. The fold button's name says what it will do: "Collapse sidebar" or "Expand sidebar".
The page beside the sidebar is a main. The sidebar itself has no navigation landmark and no name. active only draws: the dashboard adds aria-current="page" to its link, and this catalog's rows do not. ⌘B is listened for on the window, so it folds the sidebar while you type in a field too, and no screen shows the key.
API Reference
SidebarItem
| Prop | Type | Default | Description |
|---|---|---|---|
glyph | ReactNode | — | The row's icon, as an element. It sits in the gray tile. |
label | ReactNode | — | The row's name. One line; it is cut if the sidebar is too narrow for it. |
active | boolean | — | The fill and the full text color. |
end | ReactNode | — | Drawn after the label: a Kbd, a Preview badge. The caller's classes place it and hide it in the rail. |
count | string | — | A red count. A dot in the rail. Hidden from a screen reader. |
dot | boolean | { color?, size?, halo?, haloSize?, pulse? } | — | A Status dot on the glyph tile's top right corner, the tile cut away round it: the count's red unless it names a color, a 2px gap unless haloSize says otherwise, halo: "none" for no gap. Alone it shows whether the rail is open or collapsed; with a count it sets how the count's dot looks in the rail. Hidden from a screen reader. |
disabled | boolean | — | The row stays in place and cannot be clicked. |
tooltip | string | tooltip props | — | Shown to the row's right, only while the sidebar is folded. |
render | ReactElement | — | Makes the row a link: render={<ScopedLink href="/agents" />}. |
Sidebar
| Prop | Type | Default | Description |
|---|---|---|---|
collapsible | "offcanvas" | "icon" | "none" | "offcanvas" | How it folds: off the screen, to a rail of icons (the dashboard's), or not at all (this catalog's). |
side | "left" | "right" | "left" | Which edge of the window. |
variant | "sidebar" | "floating" | "inset" | "sidebar" | Flush to the edge, or a floating or inset panel. The dashboard uses the first. |
The other parts
| Prop | Type | Default | Description |
|---|---|---|---|
SidebarProvider | defaultOpen, open, onOpenChange | — | Holds whether the sidebar is open and listens for ⌘B. It writes the state to a cookie that the dashboard does not read back. Goes around the sidebar and the page. |
SidebarHeader / SidebarFooter | div | — | What stays put above and below the rows. In the dashboard: the context switcher; the fold button and the user menu. |
SidebarContent | ScrollArea | — | The rows. It scrolls when they do not fit, with a fade at the end that has more. |
SidebarGroup / SidebarGroupContent / SidebarMenu | div, div, ul | — | One group: its title and its list of rows. |
SidebarTitle | div | — | A group's title, in small muted text. It fades out in the rail. |
SidebarInset | main | — | The page beside the sidebar. |
SidebarTrigger | button | — | A button that folds or opens the sidebar. The dashboard shows it below the md width. |
useSidebar() | hook | — | The state, and toggleSidebar(), for a button that folds it. |
Rules
Written down
The same rows in every context and for every role
A row a context cannot use, or a role may not open, is disabled in its place, never hidden. Only a feature flag hides a row. A group whose rows are all hidden is not drawn.
From design/information-architecture.md §1 and §4.
Three gates, three looks
No permission: disabled, at 40% opacity, with no link. Wrong context: disabled, with an "Available in … context" tooltip. Feature flag off: hidden entirely.
From design/information-architecture.md §4.
A disabled row stays focusable
Disabled items are opacity-40 cursor-default. They stay in the page and can take focus, so a screen reader user knows they exist.
From design/principles.md §6.
The current route is marked twice
aria-current="page" and a filled background, not a change of color alone.
From design/principles.md §6.
Groups by pillar, titles in title case
The sidebar groups its rows by pillar. A group's title is title case in small muted text, not uppercase.
From design/information-architecture.md §1 and §4.
The context switcher is always visible in the header
The person must always know which workspace they are in. Two older passages still describe a picker at the page header's right (principles §3, information architecture §3); the code follows the two named here.
From design/principles.md §7 and design/information-architecture.md §6.
Icons alone only in the rail
An icon is paired with a label whenever practical. The folded sidebar is one of the places named where it may stand alone.
From design/principles.md §2.
A row's link is a ScopedLink
Give it a route path (/agents); the link adds the context. No component spells /w/, /t/ or /o/.
From ui/dashboard/CLAUDE.md §"URL and context model".
Open questions
Which groups, under which names?
OpenThe written sources and the code disagree. Information architecture §1 names three pillars: Connect, Govern, Operate. Its §3 says Connect, Secure, Operate, and its §4 says Run, Connect, Govern, Operate. The code has Build, Run, Connect, Govern, Operate, with Agents and Gateways in Build.
Not a question other systems answer.
Does a row disabled by context say why?
OpenInformation architecture asks for an "Available in … context" tooltip. The dashboard passes it, but a row's tooltip is hidden unless the sidebar is folded, so in the open sidebar nothing says why the row is dimmed.
Primer's row takes a text that explains why it is inactive.
Is the sidebar a navigation landmark?
OpenIt has no landmark and no name; the page beside it is a main. Nothing written chooses.
Primer: a nav list should always be labeled for assistive technology. Atlassian: give the side nav a unique, meaningful label.
The current row: only one, and who marks it?
OpenTwo rows can be filled at once: the current route's, and the Dome Assistant's while its rail is open (it is marked pressed, not current). And active only draws: the dashboard adds aria-current to its link by hand, and this catalog's rows do not. Nothing written says only one row, or that the row should mark itself.
Primer: only one item is marked current at a time, and the row is given aria-current, which is what marks it.
What may end a row?
OpenThe dashboard's rows end in a key or a Preview badge, both only read. This catalog's rows end in a status dot that takes focus, inside the row's link. Nothing written chooses.
Primer: an item never holds a button or another clickable thing. Polaris: don't add other components, like a badge, to a navigation item, though its row has a badge prop, as shadcn's does.
May a row be a command?
OpenSearch, Dome Assistant and Collapse are buttons that do something, among rows that go somewhere. Nothing written chooses.
Primer: activating a navigation item should change the URL.
⌘B: shown anywhere, and live in a field?
OpenNo screen shows the key, and it folds the sidebar while you type in a field. Nothing written chooses.
Atlassian shows the key in the toggle's tooltip, and keeps the shortcut off unless the product turns it on.
Is one level a decision?
OpenThe nav has one level of rows today. Our copy of the component still carries the parts for a second level, not used. Nothing written says flat.
Primer allows up to four levels, and says to rethink the design past that. shadcn and Polaris offer a second level too.
Its own glyph for every row? How is a label cased?
OpenEvery dashboard row has its own glyph; this catalog gives its molecule rows one shared glyph. Group titles are title case by rule; nothing written says how a row's label is cased, or that a glyph must be unique.
Polaris: as few words as possible, in sentence case ("Products", not "Products in your store").
What others advise
None of this is decided for us. It is what Polaris and Primer tell their own teams, beyond what the open questions already quote, listed so you can pick.
| Others advise | Who |
|---|---|
| Group related rows under titled sections. | Primer, Polaris |
| What trails a row (a count, an icon) is part of the row's spoken name. | Primer |
| Offer a link that skips the navigation and goes to the content. | Primer |
What others expose
What shadcn, Atlassian, Polaris and Primer offer for a sidebar, and where ours stands on each.
| They expose | Ours | Why |
|---|---|---|
| A badge or a count at a row's end (shadcn, Polaris) | Already there | end and count; the count stays in the rail as a dot. |
| A trigger button, a strip that toggles, floating and inset variants, the right side (shadcn) | Already there | All in our copy. The dashboard uses the trigger below the md width; the rest are not used today. |
| A second level under a row (shadcn, Primer, Polaris) | Ask | The parts are in our copy, not used today. |
| A button beside a row (shadcn, Polaris, Primer) | Ask | The part is in our copy, not used today. |
| A second line under the label (Primer) | Ask | Not in ours. |
| A name for the navigation (Primer, Atlassian) | Ask | Ours has none. |
| The fold key shown in the fold button's tooltip (Atlassian) | Ask | Ours shows no key. |
| The side nav shown as an overlay while its toggle is hovered (Atlassian) | Ask | Ours shows a tooltip per folded row. |
| A width the person can drag (Atlassian) | Ask | Ours is 256px, or 48px folded. |
| Groups that fold (shadcn; Polaris shows a few rows and expands) | Ask | Ours are always open. |