Tired of complex template languages?
Try HTML components in pure Go.
gomponents are HTML components written in pure Go They render to HTML 5, and make it easy for you to build reusable components So you can focus on building your app instead of learning yet another templating language.
The API may change until version 1 is reached.
Check out www.gomponents.com for an introduction.
Made in ๐ฉ๐ฐ by maragu, maker of online Go courses.
Features
- Build reusable HTML components
- Write declarative HTML5 in Go without all the strings, so you get
- Type safety
- Auto-completion
- Nice formatting with
gofmt
- Simple API that's easy to learn and use (you know most already if you know HTML)
- Useful helpers like
Text
andTextf
that insert HTML-escaped text,Map
for mapping data to components, andIf
/Iff
for conditional rendering. - No external dependencies
Usage
Get the library using go get
: