Open gedw99 opened 9 months ago
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.
No movement in n this yet @chasefleming
I have been playing with fully component libs that’s are already baked to make it easy to build projects.
@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?
component lib on top of it would be highly popular I think.
what do you think ?
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.
thats wonderful. Yes I would love to see the community start to build reusable components like your doing. I hope that this gets traction.
Please if you can let me see this repo , even if not finished that would be great. I will see what I can add / help.
Maybe also worth eventually making a TODO of components needed. A bit like what the DaisyUI web site has.
@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 :)
Will be happy to help ..
there are a ton of golang htmx devs that need something like this. Not just me. I am going to use it to build high quality forum software that will be open .
https://github.com/Depado/pb-templ-htmx-tailwind Is one of many. They use templ as do many but I think there is definitely some that want full control of the html like what go-elem does.
Having full control is always best if you need flexibility
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?
Shadcn seems like a great one, because it will provide a base to get going quickly for devs.
I think that we should aim to provide bug fixes by using elem-go to build the Shadcn at runtime, so that we avoid fragmentation, and build a strong base and then many devs will use it and also help fix things.
elem-go styles and attributes should be enough for devs to alter the styles. You even have a style manage. SO then a dev can pass that in.
I am really curious what you think too.
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.
This sound great . When you have the basics setup I would be very happy to contribute.
Takes ages to fill out a decent library of components . Luckily Shadcn has done all the really hard work
Feel free to grab me on telegram if you need to also
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