Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Sidebar

Primary navigation on the --side surface, extracted from the mockup’s .side, .navwrap, .navgroup and .nav.

import { Sidebar, SidebarGroup, SidebarGroupLabel, SidebarItem } from "@/components/ui/sidebar";
<Sidebar aria-label="Main navigation">
<SidebarGroup>
<SidebarGroupLabel>Workspace</SidebarGroupLabel>
<SidebarItem href="/schedule" active>Settings</SidebarItem>
<SidebarItem href="/activity">Activity</SidebarItem>
</SidebarGroup>
</Sidebar>
Terminal window
npx @glaceon/cli add sidebar --framework react # or svelte, solid

The sidebar tokens already exist in @glaceon/tokens, in both themes and mapped into the theme as --color-side*.

Token Light Dark Used for
--side #0B6E43 #0A1A13 Sidebar surface.
--side-ink #E6F5EC #DDEFE5 Item text.
--side-muted #C2E5D2 #7FA793 Group labels.
--side-active #0F844F #1E5E40 Active item fill.

--side-muted and --side-active were both darkened from the mockup so they clear WCAG AA: 3.75:1 and 3.97:1 respectively were failures, 4.64:1 and 4.74:1 pass. --side-active is aligned with the brand --green so an active item is the same green everywhere in the system.

The active item is driven by aria-current="page", not a class, so the styling and the announcement cannot drift apart.

Prop Applied styling
active Sets aria-current="page", which the item styles through aria-[current=page]:bg-side-active aria-[current=page]:text-white.
hover (any item) hover:bg-white/10.
Component Prop Type Default Description
Sidebar class string undefined Wrapper classes. Renders a <nav>.
SidebarItem active boolean false Active fill plus aria-current="page".
SidebarItem href string undefined Link target.
all parts class / className string undefined Extra classes, appended last.