Function dioxus_core::nodebuilder::attr [−][src]
pub fn attr<'a>(name: &'static str, value: &'a str) -> Attribute<'a>
Construct an attribute for an element.
Example
This example creates the id="my-id" for some element like <div id="my-id"/>.
use dioxus::builder::*; let my_id_attr = attr("id", "my-id");