mode


Description:

public SidebarMode mode { get; set; }

Determines the sidebar's look and behavior.

<picture> <source srcset="view-switcher-sidebar-modes-dark.png" media="(prefers-color-scheme: dark)"> <img src="view-switcher-sidebar-modes.png" alt="view-switcher-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.

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.

See [property@Sidebar:mode].