Skip to content

New component: Secondary Nav (Sidebar expansion)#262

Draft
zoharma wants to merge 8 commits into
mainfrom
zma/sidebar-expansion
Draft

New component: Secondary Nav (Sidebar expansion)#262
zoharma wants to merge 8 commits into
mainfrom
zma/sidebar-expansion

Conversation

@zoharma

@zoharma zoharma commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

This proposed changes rely on #210.

Added a SecondaryNav panel that sits alongside SidebarNav, with support for a title, search, and grouped or expandable lists. Also added NavigationLayout, which combines both navigation panels and handles responsive behaviour automatically, showing them side by side on desktop and switching between them on mobile.

The secondary navigation uses compact rows and the same rounded selection style as the primary sidebar. Shared navigation types have been moved to navigation/types.ts.

douglaswinter and others added 8 commits July 16, 2026 15:11
The solution in this commit is to simply have a `selected` optional prop
on the NavItemDefinition which propagates to the button component. When
using standard anchor tags, the caller will need to keep track of this
state and set it some way e.g.

    selected: window.location.pathname === "/docs"

When using react-router-dom, the state is handled in internally within
the NavLink component.

Stories have been added to demonstrate the two cases.
At 'sm' breakpoint we switch to a temporary drawer instead of a
permanent one. We could set the style conditionally but I noticed weird
flashing that I don't see when using different components.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants