Navbar and sidebar

Understory
The app shell: org switcher, nested sections, collapsed state, header actions.

Usage

The import, then a use to start from. Both copy as they are.

Import
import { NAVBAR_ROW_CLASS, NAVBAR_ROW_HOVER_CLASS, NAVBAR_ROW_SELECTED_CLASS } from "@/components/navbar/NavbarItem";

When to use

Use it for

  • The app shell: the org switcher, the sections, nested resources such as docs sites and MCP servers, and the collapsed state.
  • Nested rows are NavbarSubItem; a row's own button (expand, hide, delete) is NavbarRowAction, rendered beside the row's link.
  • Row styles come from NAVBAR_ROW_CLASS and its siblings, so any list that looks like the sidebar uses them. This site's sidebar does.

Avoid

  • A second navigation inside a page. Sections live in the sidebar; views within a page are a SegmentedControl.
  • A button nested inside a row's link: it's a sibling, in a group/row relative wrapper.

Accessibility

Checks

  • The current row stays a link, with aria-current="page", so Tab still reaches it.
  • Collapsed, every row keeps its name in a tooltip.

API

Read from each component's stories, the same source as COMPONENTS.md, and kept in step by check:design-system.

NavbarModeSwitcher

Its stories don't declare argTypes, so no props are listed. The variants show its states.
VariantsDefaultAgentsTabCollapsedCollapsedAgentsTab

NavbarSubItem

Its stories don't declare argTypes, so no props are listed. The variants show its states.
Also exportsNavbarViewAllLinkSUB_ITEM_LINK_CLASSSUB_ITEM_TOGGLE_CLASSSubItemConnector
VariantsDefaultSelectedTruncatedWithIconViewAll

NavbarRowAction

PropValues
variant"default""destructive"
revealOnHoverboolean
VariantsDefaultRevealOnHoverDestructive

Keep going