Constant freya_elements::elements::rect::shadow

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

Draw a shadow of the element.

The shadow attribute follows this syntax: shadow: <x> <y> <intensity> <size> <color>

  • x and y: Define the offset position of the shadow
  • intensity: Controls the shadow’s blur amount
  • size: Specifies the shadow’s size/spread
  • color: Any valid color value for the shadow

§Example

fn app() -> Element {
    rsx!(
        rect {
            shadow: "0 0 25 2 rgb(0, 0, 0, 120)"
        }
    )
}