Documentation menu · Navigation
Navigation

GlassSidebar

A vertical sidebar that highlights the active route.

Live previewProduction package import

#Overview

Loading preview
Status
live
Category
Navigation
Package
aura-glass

#Install and Import

Install the package once, import the component from the public entry, and load styles a single time at the app root.

shell
npm install [email protected]
import
import { GlassSidebar } from 'aura-glass/compat'
styles
import 'aura-glass/styles.css';

#Examples

Three baseline shapes flagship components use across docs and AI-agent guidance:

Basic

tsx
import { GlassSidebar } from 'aura-glass/compat';
import 'aura-glass/styles.css';

const items = [
  { id: 'home', label: 'Home', href: '/' },
  { id: 'reports', label: 'Reports', href: '/reports' },
];

export function SidebarExample() {
  return <GlassSidebar items={items} activeId="home" />;
}

Production

tsx
import { GlassSidebar, Card } from 'aura-glass';
import 'aura-glass/styles.css';

export function GlassSidebarSurface() {
  return (
    <Card>
      <GlassSidebar
        aria-label="Navigation production surface"
      />
    </Card>
  );
}

Contained

In constrained previews, hide or contain collapse controls when available and keep labels visible. A sidebar should never mount a fixed control over unrelated page chrome.

#Accessibility

Keep navigation labels visible, mark the active item, and preserve tab order through links and actions.

#SSR and Performance

Import from the public package entrypoint, load `aura-glass/styles.css` once, and keep expensive data, media, or animation work outside the visual component unless the product needs it.

#Theming

Theme with public props, `className`, `style`, and AuraGlass CSS variables. Avoid private DOM selectors so the component can upgrade with the package.