Constant freya::elements::rect::direction

pub const direction: (&'static str, Option<&'static str>, bool);
Expand description

Control how the inner elements stack.

Accepted values:

  • vertical (default)
  • horizontal
ยงUsage
fn app() -> Element {
    rsx!(
        rect {
            width: "100%",
            height: "100%",
            direction: "vertical",
            rect {
                width: "100%",
                height: "50%",
                background: "red"
            },
            rect {
                width: "100%",
                height: "50%",
                background: "green"
            }
        }
    )
}