Skip to content

Sidebar

Vertical section navigation. Groups collapse natively, and the group holding the current page opens on load.

Example

<Sidebar
  current="/components/button"
  items={[
    { label: "Getting started", href: "/" },
    {
      label: "Components",
      children: [
        { label: "Buttons", href: "/components/button" },
        { label: "Inputs", href: "/components/text-field" },
      ],
    },
  }}
/>

Props

PropTypeDefaultDescription
itemsArray-Links; children makes a collapsible group.
currentstring-Href of the current page (opens its group).
labelstringSectionNav landmark name.

Accessibility