Rebar UI

1.0

order

SidebarNav

Grouped links with an active page, counts and nested projects.

Primary navigationTint and bar active styles; the first collapses to a rail
Collapsed rail
Fill
Long label
Empty

In context

On a phoneThe sidebar as a drawer over the projects list
Projects

Harbour rebrand

On track

Tideline mobile

Review

Crew interviews

Late

Rota export

Done

Projects

Harbour rebrand

On track

Tideline mobile

Review

Crew interviews

Late

Rota export

Done

Props

PropTypeRequiredDefault
itemsSidebarNavEntry[]Yes—
renderLink((props: { href: string; children: ReactNode; className?: string | undefined; }) => ReactNode) | undefinedNo—
collapsedboolean | undefinedNo—
defaultCollapsedboolean | undefinedNofalse
onCollapsedChange((collapsed: boolean) => void) | undefinedNo—
hideCollapseToggleboolean | undefinedNofalse
logoSidebarNavLogo | undefinedNo—
headerReactNode | ((ctx: { collapsed: boolean; }) => ReactNode)No—
panelReactNode | ((ctx: { collapsed: boolean; }) => ReactNode)No—
footerReactNode | ((ctx: { collapsed: boolean; }) => ReactNode)No—
variant"list" | "grid" | undefinedNolist
labelPlacement"inline" | "below" | undefinedNoinline
workspaceSidebarNavWorkspace | undefinedNo—
searchSidebarNavSearch | undefinedNo—
activeStyle"tint" | "bar" | "fill" | undefinedNotint
collapseTogglePlacement"inline" | "edge" | "edge-hover" | undefinedNoinline
aria-labelstring | undefinedNoMain
classNamestring | undefinedNo—
bionicboolean | undefinedNo—
bionicOptionsBionicOptions | undefinedNo—

Slots and entries

logo swaps between full and compact as the rail collapses; header, workspace, search, panel and footer take the rest of a real dashboard sidebar. Besides items (one level of nested items, a badge, active), the list accepts { type: "heading" } and { type: "divider" } entries. activeStyle is "tint", "bar" or "fill"; collapseTogglePlacement is "inline", "edge" or "edge-hover".

Accessibility

Collapsed, every link keeps its full label as the accessible name (and a native title tooltip); the active item carries aria-current="page"; groups are real disclosure buttons.

data-rebar-* attributes

data-rebar-component="sidebar-nav", data-rebar-collapsed when collapsed; parts: logo, header, workspace, search, list, heading, divider, item, sublist, subitem, badge, panel, footer, collapse-toggle.

Migrating to Ant Design

AntD's Menu in inline mode inside a Layout.Sider is a close structural match (items/icon/nested sub-menus map across; collapsed maps to the Sider's own prop). Not yet codemod-covered.