⚡ Quickstart
See tempo
in action with a real-world setup.
Try It Now
⚠️ Make sure you’ve installed the prerequisites first.
Clone the demo project and start developing immediately:
bash
git clone https://github.com/indaco/tempo-demo.git
cd tempo-demo
go mod download
make dev # or: task dev
Then open http://localhost:7331 in your browser.
You’ll get:
- Live reload via
templ
- Instant CSS/JS sync via
tempo
- A ready-to-use button component with a variant (outline) and some JavaScript.
Prerequisites
Install the following tools (Go 1.23+ required):
bash
go install github.com/a-h/templ/cmd/templ@latest
go install github.com/indaco/tempo/cmd/tempo@latest
go install github.com/air-verse/air@latest
Step-by-Step Overview
Here’s how the demo project was built using tempo:
Create a Go module
bashgo mod init github.com/indaco/tempo-demo
Initialize tempo
bashtempo init
Define a component template
bashtempo component define --js
Create a component
bashtempo component new --name button --js
Write styles and scripts in
assets/button
Sync everything
bashtempo sync
Generate templ code
bashtempl fmt . && templ generate
Run the dev server
bashmake dev # or: task dev
Define a variant template
bashtempo variant define
Create the outline variant
bash
tempo variant new --name outline --component button
This creates:
assets/button/css/variant/outline.css
components/button/variant/outline.templ
Write styles for the newly created outline
variant in assets/button
.
- Edit assets and enjoy live updates! 💥
Want to see the full config and source? Browse the tempo-demo repo →