Incular logoIncular
API ReferenceNavigation & Scrolling

OverlayPortal

Semantic popup owner with presentation, role, and dismissal.

Semantic owner for menus, tooltips, and popovers. The popup child is a renderer-neutral surface partition a desktop backend may detach into a native popup.

Props

Prop

Type

use incular::prelude::*;

fn main() {
    let app = Application::new(|_cx| {
        Container::builder()
            .padding(EdgeInsets::all(24.0))
            .alignment(Alignment::CENTER)
            .child(
                OverlayPortal::new(Text::new("Anchor"))
                    .overlay_child(Text::new("Popup"))
                    .show(true),
            )
            .build()
            .into()
    })
    .expect("valid application");
    incular::run(app).expect("run application");
}

TransientRole drives defaults; for_role(Tooltip) narrows dismissal. TransientPresentation: Auto and explicit in-view/native modes.

See TransientPlacement for sides, alignment, flip/shift/constrain policy, and dismissal reasons.

Related: Navigator, Stack.

On this page