Docs sidebar
Documentation navigation and an on-page outline.
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.
When to use
- Documentation sites.
When not to use
- Application navigation.
Installation
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.
API reference
DocsSidebar
4 props
PageOutline
3 props
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
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.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/docs-sidebar.mdThe index of every part is at /llms.txt.