import { Badge, Button, SidebarNav, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavItemBadge, SidebarNavItemIcon, SidebarNavItemLabel, SidebarNavItems, SidebarNavSection, SidebarNavSectionLabel } from "@ai-ui/ui"; import type { Meta, StoryObj } from "@storybook/react"; function PatternMark() { return ( ); } function NavIcon({ kind }: { kind: "overview" | "pipeline" | "messages" | "team" | "billing" }) { switch (kind) { case "pipeline": return ( ); case "messages": return ( ); case "team": return ( ); case "billing": return ( ); case "overview": default: return ( ); } } function SidebarNavExample() { return (

ScaleOps

Revenue command center

Main Dashboard Pipeline Messages 2 Management Team performance Billing

Next pulse

Team forecast review at 09:30

Sales, finance, and ops owners are aligned on the board prep.

); } const meta = { title: "Patterns/SidebarNav", component: SidebarNavExample, parameters: { docs: { description: { component: "SidebarNav is the reusable navigation rail pattern for dashboard and workspace shells. Use it when a product needs grouped navigation, a branded header, and a supporting footer region without improvising every rail from `Card` and `Button`." } }, layout: "centered" }, tags: ["autodocs"] } satisfies Meta; export default meta; type Story = StoryObj; export const Playground: Story = {}; export const Anatomy: Story = { render: () => (

Sidebar nav anatomy

The stable hooks are the rail header, grouped sections, item rows, and footer region. That lets one product family share navigation structure without forcing every app to share the exact same icons or footer callout.

data-slot="header", data-slot="content", and data-slot="footer" define the rail frame.

data-slot="section", data-slot="item", and the nested icon / label / badge slots keep grouped navigation predictable for styling and tests.

) };