pub fn CollapsibleSidePanel(
key: impl Into<String>,
state: Rc<RefCell<CollapsiblePanelState>>,
content: impl Fn() -> View + 'static,
) -> ViewExpand description
A side-docked panel with a draggable edge: drag inward to collapse, drag the collapsed strip outward to reopen, double-click the edge to toggle.
ⓘ
let left = remember(|| Rc::new(RefCell::new(
CollapsiblePanelState::new(DockSide::Left, 280.0),
)));
Row(Modifier::new().fill_max_size()).child((
CollapsibleSidePanel("nav", left.clone(), || Column(Modifier::new()).child(Text("Sidebar"))),
Box(Modifier::new().flex_grow(1.0)).child(main),
))