Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
templ
✓ github.com/a-h/templ
Render a simple HTML component
package main
import (
"context"
"fmt"
"github.com/a-h/templ"
)
func main() {
component := templ.ComponentFunc(func(ctx context.Context, w *templ.Writer) error {
_, err := fmt.Fprintf(w, "<h1>Hello, World!</h1>")
return err
})
component.Render(context.Background(), templ.NewWriter())
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.3.1020latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.