gen the whole html5 model
https://github.com/delaneyj/gostar is a htmx style system that has strong typing support for all the of the html5 standard:
Its generated to here: https://github.com/delaneyj/gostar/tree/main/elements
It looks like its not that hard to reuse this as a basis to gen into https://github.com/chasefleming/elem-go/blob/main/elements.go
Then every possible html5 element and attribute is covered and strongly typed.
cc @delaneyj
I agree @gedw99 strong typing on the elements would be nice. I have been thinking about how to do it without burdening the user to know many different types given this library follows a different pattern. It would be a breaking change though so I'm delaying implementing it most likely until a v1 or near that.
I build off the HTML/SVG specs... If you have ideas around this @chasefleming I'm happy to collab
I'll put together my thoughts on what I was thinking for the pattern and post it soon to get feedback from you all.
@gedw99 just to clarify regarding this issue so I can address it properly, are you looking for the elements to have type safety in terms attributes or looking for a component library on top of this library?
Yep, I agree. Funny you should mention that @gedw99 , because I'm actually working on a separate component library with this library as its base. It's not ready yet, but I can make it public early if you want to start using it in its early form. If anyone else is reading this though, I highly encourage as many component libraries as possible to be built on top of this one. The more the merrier.
@gedw99 sounds good. I'll post something as soon I have it ready to use in an alpha state. Will speed up my development now that I know someone needs it :)
So, @gedw99, would you prefer an elem-go component library that has simple-to-use components—you just pass in your arguments and receive updates and bug fixes, similar to Chakra UI—or a tool like Shadcn that generates the component files for you and allows complete customization because you have the code, but doesn't provide updates and bug fixes?
The component library I'm building is built on top of elem-go, with the overriding of styles and attributes available through the component props, but I guess I don't see a need a CLI or component library have to be separate. Once one is built, the other can write them into files if a developer prefers that approach.