Sidebar builder
A collapsible navigation rail.
A builder is RenderOnce. Construct and mount it in one expression.
use gpui_kit::navigation::Sidebar;
Construct
new(ident: impl Into<Ident>) -> SelfOptions
Chain onto the value.
section(section: SidebarSection) -> Self
sections(sections: impl IntoIterator<Item = SidebarSection>) -> Self
active(id: impl Into<SharedString>) -> Self
collapsed(collapsed: bool) -> Self
header(header: impl IntoElement) -> Self
footer(footer: impl IntoElement) -> Self
on_select(handler: impl Fn(SharedString, &mut Window, &mut App) + 'static) -> SelfRendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.