For Compose HTML fans... I think a missing piece f...
# compose-web
r
For Compose HTML fans... I think a missing piece for our ecosystem is a library like compose-unstyled: one that handles UX details like accessibility, focus handling and keyboard navigation for dialogs, menus, comboboxes and the like, but leaves styling entirely to you. Today the options are either styled wrappers (e.g. Material Web, which is now in maintenance mode) or a whole framework (Kobweb/Silk). Wrapping something like Zag.js might be a quick way to get there. (I've never used it, just came up in my research). Is anyone working on something like this? Would you use or contribute to it?
👀 1
m
j
I don't really understand what you're asking for. This list:
UX details like accessibility, focus handling and keyboard navigation for dialogs, menus, comboboxes and the like, but leaves styling entirely to you
is literally what a browser already does.
➕ 1
r
At a low level yes, but I'm talking about higher-level interaction support for components we build up from browser primitives, like menus or dialog boxes.
There is a wrapper for emotion library available from jetbrains team:
This is a styling library. That's the piece I don't want -- I've already got Compose
Stylesheet
for that.
h
I published a wrapper over bootstrap. Do you mean that or a low-level library?
r
AIUI, Bootstrap covers interaction as well as styling. It’s the same choice as the other options: we only get the behavior as part of a full styled kit.
h
Then I still don't get it. You can style bootstrap with Saas/scss
r
To clarify: I'm advocating for a library that splits the styling concern from the interactivity / component state concern, and deals with only the latter. Styling is relatively simple (and designers mostly take care of this), but building the right component interactivity can be tricky (and designers don't take care of this).
Take a look at compose-unstyled and zag.js
r
You are looking for Kilua but for compose-html 😉
r
Yeah interesting @Robert Jaros, I think you're right. I gotta look into Kilua again. Can you explain the reasoning behind building your own DOM element API instead of re-using Compose HTML?
r
SSR + WasmJs
I could also add I hate looking at Html Tags Written With Capital Letters 😉
😁 2
a
Components with uppercase ftw. I am compose pilled and i'm doing this in all languages now haha
😁 1
Compose Unstyled author here. @rocketraman if you believe that you need such a library go ahead and do it. and if you believe others will benefit from it, share it with the community.