T templcn/ui

Installation

Install components in your Go/templ project.

Add templcn/ui components to your Go templ application with the CLI.

Prerequisites
Ensure you have Go and templ installed.

Install Go

Download from go.dev/dl (Go 1.22 or later), then verify:

go version

Install templ

go install github.com/a-h/templ/cmd/templ@latest
Install the CLI
Install the templcn CLI with go install.
go install github.com/ConceptCodes/templcn/cli@latest

The CLI copies source-owned component files into your project, so there is no runtime dependency on a shared component package.

Create a project
Scaffold a new Go/templ project with the starter files.
templcn init --name my-app && cd my-app && go mod tidy && go build ./...

The generated project includes a ui/ package, assets/runtime.js used by interactive primitives, styles/globals.css, and starter templ code.

Add components
Use the CLI to add components and their required support files.

Add components

templcn add button

Add multiple components

templcn add button card input

Add every component

templcn add --all

The CLI resolves dependencies, runtime files, styles, and examples for each selected component.

AI Agent Skill
Install official templcn capabilities into your AI coding assistant via skills.sh.
npx skills add conceptcodes/templcn

Works out of the box with Claude Code, Cursor, Windsurf, GitHub Copilot, and other agent skills environments.