Skip to main content

panel

Function panel 

Source
pub fn panel(
    id: impl Into<SharedString>,
    state: &Floating,
    home: Point<Pixels>,
    child: impl IntoElement,
) -> impl IntoElement
Expand description

The panel: child floating where state left it, or at home until it is dragged. Mount it in a relative() container — it lays a layer over that container’s whole box.

home is passed every render rather than stored, so a host can read it off the viewport and a window that grows never strands the panel out of reach.