Function rect

Source
pub fn rect() -> Rect
Expand description

rect acts as a generic container to wrapper other elements inside or to simply pain boxes.

Its the equivalent of other UI APIs like view/div/container etc.

See the available methods in Rect.

fn app() -> impl IntoElement {
    rect().expanded().background((0, 255, 0))
}