Shadcn-faithful UI components rendered server-side with templ on Basecoat + Tailwind. No React, no Node at runtime.
Live reference: design-system.tamper.space.
-
Import the package:
import ui "github.com/tamper-space/ui/bindings/templ"
-
Serve the embedded assets and link them, basecoat.css before app.css:
mux.Handle("/ui/static/", http.StripPrefix("/ui/static/", ui.Handler()))
<link rel="stylesheet" href="/ui/static/css/basecoat.css"> <link rel="stylesheet" href="/ui/static/css/app.css"> <script src="/ui/static/js/basecoat.js" defer></script>
-
Point your Tailwind build's
@sourceat this module's templ files.
Then compose:
@ui.Button("default", "sm", "", nil) { Save }
@ui.Card() { @ui.CardContent() { ... } }
@ui.Icon("flag", "h-4 w-4")make gallery # run the component reference at :8099
make build # templ generate + css + go build
make css # recompile CSS after changing tokens or classes
Start with docs/getting-started.md; foundations, tokens, and wiring are in docs/.