A ClojureScript port of Hiccup for fast HTML generation using Clojure data structures.
Hiccups is a ClojureScript library for generating HTML strings from Clojure data structures like vectors and maps. It ports the Hiccup library to ClojureScript, enabling fast and idiomatic HTML rendering without direct DOM manipulation. The library solves the problem of creating HTML in a Clojure-friendly way while aiming for performance similar to Google's Closure Templates.
ClojureScript developers who need to generate HTML efficiently, particularly those building web applications or server-side rendering in Node.js environments.
Developers choose Hiccups for its compile-time optimizations via macros, performance advantages of string-based rendering over DOM node generation, and its intuitive Clojure syntax that reduces boilerplate compared to alternatives like Closure Templates.
A ClojureScript port of Hiccup - a fast library for rendering HTML in ClojureScript
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses macros to perform work at compile time, improving runtime performance, as emphasized in the README's goal of doing as much as possible with macro expansion.
Generates HTML strings instead of DOM nodes, which is more performant for large markup and suitable for headless environments like Node.js, per the alternatives comparison with Crate.
Leverages Clojure vectors and maps for HTML representation, with CSS-like shortcuts for ids and classes, making it intuitive for Clojure developers, as shown in the syntax examples.
Intelligently renders HTML tags to accommodate browser quirks, such as handling script and paragraph tags differently, as demonstrated in the usage section.
Missing ported features from the original Hiccup, such as form helpers and page helpers, which are explicitly listed in the ToDo section of the README.
Requires separate requires for macros and runtime functions due to ClojureScript limitations, which can be cumbersome and confusing, especially for new users.
Fails to handle vectors as seqs properly, bailing out when vectors are passed without tags, as noted in the README, which can lead to runtime errors.
Hiccups is an open-source alternative to the following products: