html!() { /* proc-macro */ }Expand description
html! macro to parse vue-inspired syntax to generate Markup.
The basics of using html! macro:
§Text
ⓘ
html! {
"This is a sample text."
}§Empty Markup
ⓘ
html!()§Self-closing tags
Only html specified self-closing tags can be self-closing tags.
ⓘ
html! {
<br>
}§Normal tags
ⓘ
html! {
<div></div>
<my-custom-tag></my-custom-tag>
}§Component tags
ⓘ
html! {
<MyComponent></MyComponent>
}§List of tags
ⓘ
html! {
<div></div>
<span></span>
<button></button>
}§Nested markup
ⓘ
html! {
<div>
<span></span>
</div>
}§Expressions in between
ⓘ
html! {
"There are "{ count }" people."
}