ex_hiccup

A Hiccup-inspired HTML rendering library for Elixir, supporting dot-class/hash-id syntax, IO data output, safe escaping, and custom elements.

Features

Usage

ExHiccup.render_to_string({"div#main.card", %{data_role: "x"}, ["Hello!"]})
# => "<div id=\"main\" class=\"card\" data_role=\"x\">Hello!</div>"

ExHiccup.render({"input#foo.big", %{type: "text"}})
# => ["<input id=\"foo\" class=\"big\" type=\"text\" />"]

License

MIT