A Clojure library for representing HTML using vectors and maps, with automatic escaping and CSS-like shortcuts.
Hiccup is a Clojure library for generating HTML using Clojure data structures. It represents HTML elements as vectors and attributes as maps, providing a concise, programmatic way to build web pages while automatically handling string escaping to prevent XSS vulnerabilities.
Clojure developers building web applications who want a lightweight, functional approach to HTML generation without external template files.
Developers choose Hiccup for its minimal syntax that leverages Clojure's native data structures, automatic XSS protection, and seamless integration with Clojure's sequence operations for dynamic content generation.
Fast library for rendering HTML in Clojure
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 Clojure vectors and maps to represent HTML, enabling easy programmatic construction without external template files, as shown in the README examples.
Strings are escaped by default to prevent vulnerabilities, with an explicit raw function for safe unescaped content, ensuring secure HTML generation out of the box.
Supports #id and .class notation within tag vectors for concise attribute specification, reducing boilerplate in common use cases.
Automatically expands sequences in element bodies, simplifying dynamic content generation with map and for forms, as demonstrated in the syntax examples.
Hiccup 2 changes escaping behavior and return types, breaking compatibility with Hiccup 1 and requiring code adjustments, as noted in the README's migration section.
Lacks advanced features like template inheritance or built-in helpers, making complex layouts more manual compared to dedicated template engines like Selmer.
Tied exclusively to Clojure and the JVM, limiting usability in projects that aren't Clojure-based or require interoperability with other languages or frameworks.