T templcn/ui

Create

Create your Go + templ app

This page is adapted for Go and templ, with the install and setup steps rewritten for a Go codebase.

Go stdlib

Foundation for Go web applications

templ

Compile-time templates for Go

HTTP router

Route requests in your Go app

UI components

Compose pages with reusable templ views

More

Continue into installation and component docs

Quick Start
Get up and running in minutes.
1

Install the CLI

Requires Go and templ.

go install github.com/ConceptCodes/templcn/cli@latest
2

Create a project

Scaffold a Go/templ project with starter files.

templcn init --name my-app

Then build it:

cd my-app && go mod tidy && go build ./...
3

Add components

Add the components you need to your project.

templcn add button

Add multiple components:

templcn add button card input
4

Use components

Import and use components in your app.

import "my-app/ui"

templ Page() {
  @ui.Button(ui.ButtonProps{Label: "Click me"})
}
5

Install AI Agent Skill

Add templcn expertise to Cursor, Claude Code, Windsurf, Copilot, or Antigravity via skills.sh.

npx skills add conceptcodes/templcn

Next Steps

Where to go from here