Skip to content
loseta

Components / Navigation

Sidebar

A composed sidebar shell for navigation and footer content.

Status stableInstalls collapsibleWorks with button, sheet

Installation

pnpm dlx loseta add sidebar
npx loseta add sidebar

Examples

Groups

With icons

Group action

Collapsible groups

Nested menu

Badges

Actions

Scrollable content

Mobile

Right-to-left

Accessibility and behavior

  • Composition, not a stateful widget. Use an aside with header/section/footer; active links use aria-current="page". Each nav group takes its name from a heading in its header or [data-slot="group-label"], with an optional [data-slot="group-action"] button. Rows accept one trailing [data-slot="menu-badge"] or [data-slot="menu-action"]; collapsible details and nested uls form submenus. The section scrolls, and the mobile composition uses a labelled sheet.

Files

components/sidebar.cssbase
styles/nova/sidebar.cssstyle

Install contract

The CLI writes the base file under components/, the visual file for the selected style under styles/<name>/, and any primitive dependency underprimitives/. The generated index.css imports them in the right layer order.

← Back to components

loseta is MIT licensed. Built with native CSS, no runtime. Inspired byshadcn/ui.