Skip to main content

NavigationRail

Function NavigationRail 

Source
pub fn NavigationRail(props: NavigationRailProps) -> impl IntoView
Expand description

§Required Props

  • items: Vec<NavItemView>
    • List of nav items in display order (top to bottom).
  • active: AppSection
    • The currently-active section. The matching item gets the nav-rail-item-active class.
  • workspace: WorkspaceBadgeView
    • Top-of-rail workspace marker.

§Optional Props

  • user: UserAvatarView
    • Optional bottom-of-rail user avatar.
  • workspace_open: bool
    • true when the workspace switcher menu is open — controls the badge’s open state.
  • on_select: [Callback<AppSection>]
    • Optional callback fired when the user clicks an enabled rail item (M-TRAY.2 / AUT-251). The argument is the clicked item’s AppSection. M-TRAY.4 (AUT-253) wires this in crates/app-ui to drive the active-surface signal; the storybook stories leave it None so SSR snapshots stay identical to the pre-callback baseline. Disabled items never fire the callback.