yew-html-ext

Crates.ioyew-html-ext
lib.rsyew-html-ext
version0.3.2
sourcesrc
created_at2024-02-14 12:18:47.723762+00
updated_at2025-04-21 15:20:39.477829+00
descriptionHandy syntactic extensions for Yew's HTML macros
homepage
repositoryhttps://github.com/schvv31n/yew-html-ext
max_upload_size
id1139824
size316,708
Tim Kurdov (its-the-shrimp)

documentation

https://docs.rs/yew-html-ext/latest/yew_html_ext/

README

yew-html-ext

Crates.io Version docs.rs

Write HTML in Rust more concisely

yew-html-ext provides a drop-in replacement for Yew's html! and html_nested! macros with a number of syntactic extensions. Being a drop-in replacement, all one has to do to start benefitting from this library is:

  1. Add it to the project's dependencies
[dependencies]
yew-html-ext = "0.3"
  1. Replace uses/imports of yew::html{_nested} with yew_html_ext::html{_nested}

The provided macros facilitate an experimental ground for potential additions to Yew HTML proper, which is why the base features are untouched, only new ones are added. The specific syntax provided by the library is explained in

the docs

Format this new fancy HTML

yew-fmt has support for this extended syntax, which is however opt-in and is to be enabled by adding the following line to rustfmt.toml:

yew.html_flavor = "Ext"

More on this here

Commit count: 0

cargo fmt