Skip to content

Navigation

Sidebar

Also calledside navigationvertical navigation

A side column that keeps navigation or supporting information beside the main content instead of covering it.

How people describe it

  • “column of links down the left side”
  • “menu that stays beside the main content”
  • “vertical list of sections along the edge of a page”

Good for

  • Persistent dashboard navigation
  • Documentation section links

Don’t mix it up with

  • Slides over the page and may use a backdrop; a sidebar occupies space beside content.

What your library calls it

LIBRARYCALLS IT
shadcn/uiSidebar

Accessibility checklist

  • Label navigation landmarks distinctly
  • Mark the current page and keep keyboard focus visible
  • Keep DOM reading order logical when the sidebar stacks

Try it

Dashboard

Collapse it with the top button. Collapsed items keep their names for screen readers.

Prompt

Add a sidebar with labeled navigation and a marked current link.

~16 estimated prompt tokensDetailed: ~61 estimated prompt tokens

Rough estimate for prompt text only; actual counts vary by model and context.

<nav aria-label="Project navigation">
  <ul style="list-style:none; padding:0; margin:0">
    <li><a href="/overview/" aria-current="page" style="display:flex; align-items:center; min-height:44px; font-weight:bold">Overview</a></li>
    <li><a href="/activity/" style="display:flex; align-items:center; min-height:44px">Activity</a></li>
    <li><a href="/settings/" style="display:flex; align-items:center; min-height:44px">Settings</a></li>
  </ul>
</nav>
<!-- Place this navigation beside main content; stack it above on narrow screens. -->

Used in

Explore website blueprints that use this component.