Docs layout with sidebar

Documentation-style layout with a collapsible sidebar and main content area. Use with the Docs scaffold variation.

This block is the docs layout pattern: a sidebar for navigation and a main content area. The Rizzo docs site uses this layout. When you scaffold with the Docs variation, you get the same structure—sidebar, header, and content container—using Rizzo tokens and BEM-style classes (docs__sidebar, docs__main, etc.).

Structure

Conceptually, the layout looks like this:

Page title

Optional description.

Main content goes here. Use Rizzo typography and spacing tokens. On small screens the sidebar can collapse behind a toggle.

Usage

Copy the snippet for your framework. Same BEM classes (docs-sidebar, docs__main, docs__container, docs__content) work in any stack.

Usage

Full example for each framework (Astro, Vanilla, Svelte, Vue, React). Switch framework via View as or by clicking a Usage tab—both stay in sync.

Astro Vanilla Svelte Vue React

Get this block via CLI

Scaffold a new project with the Docs template (Vanilla, Astro, Svelte, React, or Vue):

bash bash
npx rizzo-css init --framework astro --template docs --yes

Or add to an existing project:

bash bash
npx rizzo-css add --framework astro --template docs

What you get

  • Sidebar with nav links (and optional subsections)
  • Main content area with header (title + description) and content container
  • Mobile-friendly sidebar toggle and overlay
  • Rizzo design tokens and BEM classes for theming