This repository contains a collection of reusable Templ components and a centralized stylesheet for common elements such as inputs and buttons.
Appkit uses templ to define a set of components in Go. To generate the templates, run:
templ generate
During development, it can help massive to have hot reload to be able to make changes and see them quickly. We're currently using Air for this:
Air is a great tool to auto reload potentially any project, but works great with Go. Install with:
go install github.com/air-verse/air@latest
The .toml
is already configured and ready in this repository, so simply run:
air
Air is a bit more reliable at detecting file changes, especially for stylesheets. You'll always need to wait a few seconds before page reloads to give the system chance to recompile. A proxy is available with Air, but we didn't find it to be very reliable and was breaking with query parameters, it obvously also wouldn't work for PDF reloads.