←back to thread

63 points markusw | 2 comments | | HN request time: 0.588s | source

Hey everyone! I just released v1.0.0 of gomponents last week. It's an HTML component builder in pure Go, with a DSL-like HTML syntax. It's been 4 years in the making, and makes it really easy to build HTML in your web apps.
Show context
floydnoel ◴[] No.41852638[source]
are event handlers possible? neither the Github repo nor the linked page showed an example of a button or form submission.
replies(5): >>41856116 #>>41875243 #>>41875298 #>>41876441 #>>41876492 #
1. _heimdall ◴[] No.41876441[source]
It looks like this is focused on server rendering HTML, no client-side runtime or anything like that.

I don't see any used of a `Script()` function or similar in the example apps, though you could always chunk some JS in a public directory and link it in the HTML.

They do have a starter example that uses HTMX. That'd be my go-to as well for a tool that's sticking with server rendering HTML.

replies(1): >>41876496 #
2. markusw ◴[] No.41876496[source]
Yep, this exactly. And the starter kit mentioned is here, for anyone curious: https://github.com/maragudk/gomponents-starter-kit