Components

Sidebar

A sidebar component for displaying navigation and other content, built with Base UI components.

Loading

Installation

pnpm dlx shadcn@latest add @toui/sidebar

Pattern

Tokens

7 CSS variables in 5 categories.

width

CSS VariableValueDescription
--sidebar-width-collapsed3.5rem56px — icon-only
--sidebar-width-default16rem256px — default
--sidebar-width-wide20rem320px — wide

header-height

CSS VariableValueDescription
--sidebar-header-height3.5rem

footer-height

CSS VariableValueDescription
--sidebar-footer-height3.5rem

px

CSS VariableValueDescription
--sidebar-pxvar(--component-px-md)

gap

CSS VariableValueDescription
--sidebar-gapvar(--component-gap-sm)

API Reference

This component is based on the Base UI Meter primitive.

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking Accept, you agree to our use of cookies.
Learn more.