23 releases
0.2.5 | Jun 3, 2024 |
---|---|
0.2.2 | Feb 20, 2023 |
0.2.1 | Nov 8, 2021 |
0.1.14 | Jul 28, 2021 |
0.1.4 | Mar 16, 2019 |
#1084 in Procedural macros
266 downloads per month
Used in 5 crates
(3 directly)
62KB
1K
SLoC
html-macro
use html_macro::*;
fn main () {
let component = html! { <div id='component'>Some component</div> };
let text_var = "You can interpolate text variables";
let html = html! {
<div onclick=|_ev: web_sys::MouseEvent| {}>
You can type text right into the elements
{ component }
{ text_var }
</div>
};
println!("{}", node);
}
Dependencies
~240–690KB
~16K SLoC