Constant freya_elements::attributes::svg_data::svg_data

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

The svg_data attribute lets you provide raw SVG data directly.

This is similar to the image_data attribute but specifically for SVG data.

§Example

static SVG_ICON: &[u8] = include_bytes!("../../../../examples/settings.svg");

fn app() -> Element {
    rsx!(
        svg {
            width: "100%",
            height: "100%",
            svg_data: static_bytes(SVG_ICON),
        }
    )
}