AppSidebar
- Layer: Primitive
- Base: Custom — no Ark UI dependency
Interactive
Section titled “Interactive”Full sidebar — click nav items
RisingSwamp
The Den
import { AppSidebar, Button } from "@risingswamp/design-system";
<AppSidebar> <AppSidebar.Brand>RisingSwamp</AppSidebar.Brand> <AppSidebar.Nav> <AppSidebar.NavItem href="/" active> The Den </AppSidebar.NavItem> <AppSidebar.NavItem href="/vault">Vault</AppSidebar.NavItem> <AppSidebar.NavItem href="/settings">Settings</AppSidebar.NavItem> </AppSidebar.Nav> <AppSidebar.Footer> <Button style={{ width: "100%" }}>+ Feed</Button> </AppSidebar.Footer></AppSidebar>;Sub-components
Section titled “Sub-components”| Sub-component | Element | Purpose |
|---|---|---|
AppSidebar.Brand | div | App name — mono, uppercase, muted |
AppSidebar.Nav | nav | Flex column, takes remaining height |
AppSidebar.NavItem | a | Nav link with active bar indicator |
AppSidebar.Footer | div | Pinned to bottom via mt: auto |
AppSidebar.NavItem props
Section titled “AppSidebar.NavItem props”| Prop | Type | Default | Description |
|---|---|---|---|
href | string | required | Link destination |
active | boolean | false | Shows 3px accent bar + accent text color |
children | JSX.Element | required | Link label |
Router integration:
AppSidebar.NavItemrenders a plain<a>element. When using SolidJS Router, use the router’s<A>component with thesidebar-linkCSS class andsidebar-link-active-barspan instead — seesrc/components/Sidebar.tsxfor the pattern.
Design notes
Section titled “Design notes”- Width is fixed at
200pxviaflexShrink: 0— the parent flex container gives remaining space to the content area. - Active bar:
3pxwide,20pxtall,border-radius: 0 2px 2px 0— sharp left edge flush with the sidebar border, rounded right. - No blur on the sidebar — Plane 1 rule.
--nav-bgwith backdrop-filter is Plane 2 only. - Brand text:
font-mono,0.22emletter-spacing, uppercase,text.muted— intentionally quiet, not competing with nav items.
Plane 1 Constraints
Section titled “Plane 1 Constraints”- No backdrop-filter / blur
- No gradients
- Hover is
bg.defaulttone shift only - Active state: accent color + active bar — no glow