Re:Shoelace: A library of web components
by andix on Wednesday January 10, 2024 @06:13PM
(#38944912)
I didn't like that the components are all web components with their own shadow Dom inside. Makes styling really hard and didn't work with tailwind for example.
[ Parent
| on HN ]
Re:Shoelace: A library of web components
by mondrian on Wednesday January 10, 2024 @08:32PM
(#38946235)
I guess the advantage is that you can drop them into any HTML page and they look and work correctly. And you can control them with plain JS, like `document.getElementByID(dialogId).open = false;`
Re:Shoelace: A library of web components
by andix on Wednesday January 10, 2024 @08:46PM
(#38946345)
Probably, from my perspective (using a frontend framework) this doesn't sound too helpful though.
Re:Shoelace: A library of web components
by Bytewave81 on Wednesday January 10, 2024 @06:48PM
(#38945302)
Not just that, but it basically makes the library incompatible with serverside rendering a la Next.js. We actually explored using Shoelace for a project but ended up having to choose something else instead because of this.
Re:Shoelace: A library of web components
by neeleshs on Wednesday January 10, 2024 @07:27PM
(#38945664)
What did you end up using?
Re:Shoelace: A library of web components
by Bytewave81 on Wednesday January 10, 2024 @09:01PM
(#38946473)
We settled on Chakra (https://chakra-ui.com/). Although we also abandoned our ambitions of a Next.js migration, so... I guess it didn't really end up mattering all that much anyway.
Re:Shoelace: A library of web components
by neeleshs on Wednesday January 10, 2024 @10:07PM
(#38946988)
Thank you
True, it completely relies on client side rendering, and it's impossible to render it server side. With disabled Javascript it doesn't show anything at all.
I would really like to use it, but using it feels like limiting your options much more than necessary. Even the CSS-in-JS based libraries (like React MUI) allow SSR to some extent.