Skip to content

Navigation rail group

Pro

A rail destination that opens a secondary column of links on hover or focus, and folds as an accordion in an expanded rail. Not an M3 component (@windmorph/react-pro).

import { NavigationRailGroup, NavigationRailGroupItem } from '@windmorph/react-pro';

Part of Windmorph Pro, paid components on the free core, not on sale yet. See the Pro guide for what it includes and to register interest.

Keyboard

Navigation rail group keyboard
KeyAction
TabMoves through the destinations, and into an open column’s links.
Arrow Up or Arrow DownMove between the rail’s destinations.In the rail
EnterFollows the focused link.
EscapeCloses a preview and returns focus to its destination.

Keyboard focus opens a column at once; a column someone is reading by keyboard stays open when the pointer leaves.

Screen reader

Role
Destinations are links in the rail’s nav; the column is a group. In an expanded rail, a group is an accordion.
Accessible name
The destination’s label; the column takes aria-label, or the label.
States announced
A destination has aria-expanded and aria-controls. The current link has aria-current="page", and a closed column is inert.

A group that holds the current page shows as current without claiming to be the page.

Focus

  • Closing a preview with focus inside it hands focus to its destination first.
  • Each link shows the M3 focus indicator from the keyboard.

Touch target

  • Destinations are the rail’s, and links are 48px rows at density 0.
  • Touch only navigates: there’s no preview to dismiss.

Motion

  • The column’s width springs open and closes without a bounce. Under reduced motion it only fades.
  • In forced colours the column keeps a CanvasText edge and the current link keeps Highlight.

What you need to do

  • Pass currentPath, or current on an item, so the right link is marked.
  • With pinned, leave room for the column in your layout.
  • Wrap your app in React Aria’s RouterProvider for client-side navigation.