Skip to content

Search

Start typing to search.


Show all pages

Documentation

navigation

Sidebar

Grouped links beside the content, for apps and documentation with many pages.

CSS onlyPlain classes; no JavaScript in any stack.

Usage

Groups of links with a heading each, in a <nav>. The current page has aria-current="page".

HTML

Examples

Guidance and accessibility

When to use

  • Use a sidebar when there are more places to go than fit in a navbar, such as the settings of an app or the pages of documentation.
  • Group links under short headings, in the order people use them.
  • On small screens, put the sidebar behind a button, for example in a popover or a dialog.

Accessibility

  • Give the <nav> an aria-label that says what it covers, such as “Settings”.
  • Connect each list to its heading with aria-labelledby, so screen readers read the group name.
  • Mark the current page with aria-current="page"; the skin shows it with a fill and bold text, not by color alone.

Classes

Generated from the component contract. Parts use __, modifiers use --.

Classes of the sidebar component
ClassKindUse it for
ca-sidebarComponentThe <nav> that stacks the groups.
ca-sidebar__groupPartOne group of links with its heading.
ca-sidebar__headingPartThe name of a group.
ca-sidebar__subheadingPartNone
ca-sidebar__listPartThe <ul> of links in a group.
ca-sidebar__linkPartOne link; the current page is filled and bold.

Skins

The same markup, dressed by each skin. Structure and behavior stay the same; only the look changes.

Base skin

Neutral grayscale starting point; product skins extend it and change what differs.

Calaca skin

The Calaca UI brand: hueso paper and tinta ink, cempasúchil marigold, rosa and jade.

Proof skin

Pilot skin pushed far from base: square, heavy, offset shadows, larger targets.

Crossview skin

The CrossView proofing table: cool ground, bond-paper sheets, rule-grey hairlines, one red mark.

Framework notes

Link the prebuilt stylesheet of your skin next to your brand theme. No build step.

HTML
<link rel="stylesheet" href="theme.css" />
<link rel="stylesheet" href="ca-base.css" />