Skip to content
caliper ui docs

Pro

Docs sidebar

Documentation navigation and an on-page outline.

Pro
pnpm dlx shadcn@latest add @caliper/docs-sidebar

Developer docs

Components, guides and the outline of the page you are reading

Data grid

Overview

What the component is for, when to reach for it, and which part to use instead when it is not the right fit. Every example on this page can be copied and edited in your own source.

Install

Components are added to your project as source, so you own the code and can change anything. Pick the package manager you already use.

With npm

Run the add command through npx with the component name. The files land under components/ui along with any parts it builds on.

With pnpm

Run the same command through pnpm dlx. Nothing is installed globally and the lockfile is left as it was.

Use it

Import it from your components folder and pass your data. Loading, empty and error states are built in, and the keyboard works without extra setup.

Props

Every prop is typed, and the ones you will use most come first. Callbacks receive the changed value, so you can keep state wherever you like.

Installs components/ui/docs-sidebar.tsxDepends on lucide-reactMotion honours reduced motion

When to use

Use it for

  • Documentation sites.

Skip it when

  • Application navigation.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/docs-sidebar

Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage

Import it from your copy of the source. The example behind the preview comes with the source. It is built from DocsSidebar and PageOutline.

example.tsx
import { DocsSidebar, PageOutline } from "@/components/ui/docs-sidebar"

The worked example comes with Pro

The 69-line example behind the preview opens here, ready to copy.

  • 626 Pro parts, blocks and page templates, all with source
  • $149 once, with lifetime updates. No renewal
  • A full refund within 14 days if it is not for you
Checking your licence…

API reference

DocsSidebar

component
PropTypeDefault
sections *readonly DocsSection[]—
activeId *string—
onNavigate *(id: string) => void—
classNamestring—

PageOutline

component
PropTypeDefaultDescription
headings *readonly OutlineHeading[]—
scrollRootRefObject<HTMLElement | null>—The scrolling container, if the page scrolls inside one.
classNamestring—

Accessibility

It exposes status semantics, with aria-label, aria-hidden, aria-labelledby and aria-current kept in step with state. Changes that matter are announced through a live region.

No custom key handling; Tab and the native activation keys do the work.

Motion

It checks prefers-reduced-motion itself and settles immediately instead of travelling. Every state is still reachable.

All Workspace chrome examples