# templ

> An HTML templating language for Go that has great developer tooling

Source: https://talira.ai/catalog/templ-ge7974g9
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library, Command-line tool
- Categories: [libraries / templating](https://talira.ai/categories/libraries/templating), [languages / go](https://talira.ai/categories/languages/go)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Pricing notes: Free under the MIT licence.
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- Backed by: [Adrian Hesketh](https://talira.ai/orgs/adrian-hesketh.md)

templ is a language for writing HTML user interfaces in Go. You write components in .templ files that mix HTML with Go expressions and ordinary if, switch and for statements, and the templ CLI compiles them into type-checked Go code that renders HTML fragments, pages or whole apps. Components compose, call any Go code and need no JavaScript on the client or server. It renders on the server (as a standard Go program, a container or a serverless function) or generates static HTML files, and its language server gives editors autocompletion, formatting and error checking. It is often paired with [htmx](https://talira.ai/catalog/htmx-77jdt43j.md).

## Links

- Website: https://templ.guide/
- GitHub: https://github.com/a-h/templ
- Docs: https://templ.guide/

## Problems it solves

- write HTML templates in Go with type checking and editor autocompletion
- build server-rendered Go web pages from reusable components
- generate a static site from Go code
- replace html/template because typos only show up at runtime

## Features

- HTML components compiled to Go code
- type-checked templates
- use Go if, switch and for statements
- server-side rendering
- static HTML generation
- language server with IDE autocompletion
- code formatter
- no JavaScript required

## Trust

Overall: 0.71 out of 1.
Signals: maintenance 1.00, adoption 0.81, momentum 0.66, community 0.90, backing 0.30, extensibility 0.00.

- last commit 11 days ago
- 69 commits in the last 90 days
- latest release v0.3.1118 12 days ago
- 10.6k GitHub stars
- 175 contributors
- accepts sponsorship (Github, Github)
- backed by Adrian Hesketh

## Related

- Works with [htmx](https://talira.ai/catalog/htmx-77jdt43j.md)

## Sources

[^1]: https://github.com/a-h/templ/blob/main/LICENSE (checked 24 Nov 2026)
[^2]: https://templ.guide/ (checked 24 Nov 2026)
