are event handlers possible? neither the Github repo nor the linked page showed an example of a button or form submission.
That said, there's gomponents-htmx [0] for easy integration with HTMX.
21–30 of 50 posts
are event handlers possible? neither the Github repo nor the linked page showed an example of a button or form submission.
That said, there's gomponents-htmx [0] for easy integration with HTMX.
are event handlers possible? neither the Github repo nor the linked page showed an example of a button or form submission.
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.
Looks cool. There is also Templ[1] that does something similar, though uses codegen. I wish there is an equivalent of Storybook for these things though, it would be really nice! [1] https://templ.guide/
That’s awesome! I have a very similar project Dovetail, that tries to nudge you into making things accessible. https://github.com/RoyalIcing/Dovetail
You may also be interested in the "go podcast()" episode I was in earlier this week, talking about gomponents with Dominik: https://gopodcast.dev/episodes/045-gomponent-with-markus-wus...
While acknowledging the use case of "the designer who doesn't know how to program" and the desirability in some sense of separating logic from data, if I am going to slam together some HTML as a programmer, with no "non-programmer" designer in sight, I tend to slap together a local version of templates like this if I can't find a good one available. The reason is, if I'm going to mix logic and presentation anyhow, wh…
Now that the pendulum has swung in favor of rendering HTML server-side again and sprinkling Javascript on top, I sense a lot of interest in different ways of doing things than the default backend + JSON HTTP API + React/Vue frontend stack. And because Go is such a relatively simple language, maybe purely frontend/design-focused developers can pick it up and start writing HTML components with it?
(It helps that my preferred style of putting all HTML components inside a package called "html" inside the Go module/app could neatly containerize newcomers, to not scare them off with all the other stuff that is a Go app.)
are event handlers possible? neither the Github repo nor the linked page showed an example of a button or form submission.
If you mean “action=/foo” for a “form” tag, there is an “Action” attribute: https://github.com/maragudk/gomponents/blob/main/html/attrib...
Awesome, now do it in Haskell!
Looks cool. There is also Templ[1] that does something similar, though uses codegen. I wish there is an equivalent of Storybook for these things though, it would be really nice! [1] https://templ.guide/
What's Storybook? Could you elaborate?