←back to thread

67 points markusw | 1 comments | | HN request time: 0.309s | 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. markusw ◴[] No.41876492[source]
gomponents is just a glorified string builder, so it's more or less like writing HTML in Go that gets output from the server. So you put event handlers on your elements like you normally would, write scripts and include JS like you normally would, etc.

That said, there's gomponents-htmx [0] for easy integration with HTMX.

[0]: https://github.com/maragudk/gomponents-htmx