mode


Description:

public SidebarMode mode { get; set; }

Determines the sidebar's look and behavior.

<picture> <source srcset="sidebar-modes-dark.png" media="(prefers-color-scheme: dark)"> <img src="sidebar-modes.png" alt="sidebar-modes"> </picture>

If set to [enum@Adw.SidebarMode.sidebar], behaves like a sidebar: with a sidebar style and a persistent selection.

If set to [enum@Adw.SidebarMode.page], behaves like a page of boxed lists. In this mode, the selection is invisible and only tracked to determine the initially selected item once switched back to sidebar mode.

The page mode is intended to be used with [class@NavigationSplitView] when collapsed, as the sidebar pane becomes a page there.

When used with [class@OverlaySplitView], the sidebar should stay in sidebar mode, as the sidebar pane is still a sidebar when collapsed.