Attribute Macro has_html_attributes

Source
#[has_html_attributes]
Expand description

The attribute macro that add the fields to your props struct. It expect to be used on a struct that derive the yew::Properties trait and the yew_html_attribute::HasHtmlAttributes trait.

§Arguments

  • exclude: A list of attributes to exclude from the struct in a string. [Default: “”]
  • invisible: A boolean that mark the target element as not part of the visble html element (Ex : <script/>) [Default: false]
  • element: A string that specify the html element to use. [Default: “div”]

§Example

#[has_html_attributes]
#[derive(Debug, Clone, PartialEq, Default, yew::Properties, yew_html_attribute::HasHtmlAttributes)]
pub struct InputProps{}