Skip to content
shadcn-templ

shadcn-templ

shadcn/ui ported to Go and templ: 52 components, 27 blocks, its own CLI

Tier A · StrongComponent LibraryRegistryBlock Collectionshadcn-templ.com

Preview image from shadcn-templ.com

shadcn-templ is an unofficial community port of shadcn/ui for Go's templ templating language, built by Axel Adrian. It ships 52 UI components and 27 blocks through a registry.json and a Go CLI, so you copy source into your project instead of taking a dependency. Styling is Tailwind v4 with CSS variables; interactivity is vanilla JavaScript rather than React. Version 2.0 is in beta and adds theming presets, charts and a Typeset section.

Install
go install github.com/axadrn/shadcn-templ/v2/cmd/shadcn-templ@latest && shadcn-templ init -t templ && shadcn-templ add card && templ generate && go mod tidy

For an agent

Reach for this the moment a Go project needs a UI and the alternative is hand-writing templ markup - it is the closest thing to shadcn/ui parity outside the React world, and because the components are copied into the repo you can edit them freely. Do not run `npx shadcn add` against it; the CLI is a separate Go binary (`shadcn-templ add <name>`) and every add must be followed by `templ generate` and `go mod tidy` or the build fails with missing generated _templ.go files. Read https://raw.githubusercontent.com/axadrn/shadcn-templ/main/registry.json to enumerate exactly what exists - the site's own /registry.json 404s, and the registry file is the only reliable list of the 52 UI items plus 27 blocks. Interactivity is vanilla JS, not Radix, so accessibility is claimed rather than inherited - verify keyboard and focus behaviour on dialogs and menus yourself.

Why it is here. Go and templ teams had no credible shadcn equivalent; this one is MIT, pushed daily, at 1.7k stars, and it mirrors the upstream component names closely enough that shadcn knowledge and prompts transfer directly.

Install command, framework, licence and component list.

Facts

License
MIT
Pricing
Free, Open source
Framework
Go / templ, Vanilla JS
Styling
Tailwind CSS v4, CSS custom properties
Distribution
shadcn registry, CLI installer, GitHub repository, Copy-paste snippet
Platform
Web
Content type
Code, Design tokens / theme files
Agent readiness
Machine-readable registry item, CLI installable, Readable open source, Structured documentation
Accessibility
Accessible, Keyboard navigable
Maturity
Actively maintained
GitHub stars
1,708

Components it ships

52 total

Helps you build

6

Templates

27

Notable for

  • shadcn/ui parity for Go + templ
  • registry.json with 52 UI items and 27 blocks
  • own Go CLI: shadcn-templ init / add
  • Tailwind v4 with theming presets
  • dashboard-01 plus 16 sidebar, 5 login and 5 signup blocks

Provenance

Verified 2026-08-15. HTTP 200. https://shadcn-templ.com/, https://shadcn-templ.com/docs/components, https://shadcn-templ.com/docs/installation, https://shadcn-templ.com/blocks, https://raw.githubusercontent.com/axadrn/shadcn-templ/main/registry.json, gh api repos/axadrn/shadcn-templ

Also in Component Libraries

6
shadcn-templ.comTier A