# a-h/templ

A language for writing HTML user interfaces in Go.

Repository: https://github.com/a-h/templ
Canonical: https://ross.abutalabs.com/products/templ
Homepage: https://templ.guide/
Language: Go
License: MIT
License Family: permissive
Topics: templating-languages, ide-support, lsp, language-server, html-elements, go, htmx, server-side-rendering
Last push: 2026-08-07T18:34:18+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 96, release rhythm 83, longevity 100
- inputs: {"age_days": 1971, "days_push": 26, "days_rel": 115, "gap_med": 29, "n_releases_24m": 20}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 10514, forks 367 (observed 2026-08-28T04:10:42.196843+00:00)

## What it is
templ is a typed HTML templating language for Go that compiles components into performant Go code for server-side or static rendering. It ships with strong developer tooling including IDE autocompletion and a language server (LSP).

## Use cases
- render html pages in go
- build server-side rendered go web apps
- create reusable html components in go
- generate static html files from go
- use htmx with go
- get ide autocomplete for go html templates

## When to choose
- you write Go web apps and want type-safe, compiled HTML templates
- you want server-side rendering without client-side JavaScript
- you need good IDE tooling and LSP support for templates
- you use frameworks like Chi, Echo, Gin, or Fiber and want a framework-agnostic templating layer

## When to avoid
- you need client-side interactivity or a full frontend framework like React
- your stack is not Go
- you prefer runtime-flexible templates over compiled ones

## Facets
- artifact type: library
- maturity: active
- function: templating, ssr, web-framework, developer-tools
- domain: web-development, frontend, backend, programming-languages
- platform: go, cross-platform, cli
- tags: html-templating, lsp, ide-support, htmx, server-side-rendering, compiled-components, no-javascript, web-server

## Member repositories
- a-h/templ (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:42.196843+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:18:35.244548+00:00, confidence not recorded.
  - readme: https://github.com/a-h/templ (fetched 2026-08-28T04:10:42.196843+00:00, sha 30155a928664)
  - homepage: https://templ.guide/ (fetched 2026-08-29T08:17:55.006405+00:00, sha 5322b632042f)
  - site_page: https://templ.guide/quick-start/installation (fetched 2026-08-29T08:17:55.010731+00:00, sha 5f7dbe71bee9)
  - site_page: https://templ.guide/integrations/web-frameworks (fetched 2026-08-29T08:17:55.012893+00:00, sha 96b8de962f14)
  - site_page: https://templ.guide/faq (fetched 2026-08-29T08:17:55.014806+00:00, sha 7aeaa473a065)
- Data as of 2026-08-30T08:39:29.467469+00:00.
