An HTML and SVG DSL for Elixir that works with Phoenix, LiveView, and other web frameworks.
Temple is an Elixir domain-specific language (DSL) for writing HTML and SVG templates. It provides an elegant, composable syntax that integrates seamlessly with Elixir's ecosystem while maintaining compatibility with existing web frameworks like Plug, Aino, Phoenix, and Phoenix LiveView.
Elixir developers building web applications who need a templating solution that uses valid Elixir syntax and works across multiple web environments. It is particularly suited for those using Phoenix or Phoenix LiveView who want a DSL with component slots similar to Vue, HEEx, or Surface.
Developers choose Temple because it strictly uses valid Elixir syntax, ensuring compatibility with Elixir tooling and editors, and it is framework-agnostic, working across all major Elixir web environments without compromise. Its component system with slots allows for reusable, composable templates that are interoperable with HEEx and Surface components.
An HTML DSL for Elixir and Phoenix
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 valid Elixir syntax, ensuring seamless compatibility with editors, formatters, and other Elixir development tools.
Designed to work across all major Elixir web environments like Plug, Aino, Phoenix, and LiveView without modification.
Supports a slot system similar to Vue or Surface for reusable, composable components, with interoperability for HEEx and Surface components.
Allows customization with any EEx.Engine implementation, such as Phoenix.HTML.Engine for HTML escaping or Aino.View.Engine for alternative features.
As a version 0.x project, it may have breaking changes and less stability compared to mature templating solutions like EEx or HEEx.
Relies on guide-based documentation that might not cover all edge cases or complex scenarios, requiring more trial and error.
The DSL and component system add complexity over plain EEx for basic HTML generation, making it less ideal for trivial templating needs.