|
|
|
|
|
by Rodeoclash
1049 days ago
|
|
I wouldn't mind a sanity check on using Web Components in this context: We have a bunch of sites written in different frameworks (React, Rails + Hotwire, Phoenix + Liveview) that we'd like to have a shared set visual components between them. Think things like: - Buttons
- Text spacing
- Layout cards
- Headers Pretty low level stuff, the most dynamic behaviour might be something like showing / hiding content in an FAQ. Web Components seems like a reasonable fit to encapsulate the design elements and reuse them across all these different frameworks (probably coupled with Tailwind CSS on each site to enforce consistent colours + spacing). |
|
IMHO you probably want to look at design tokens or other ways to centralize your visual styles--it's really more of a workflow problem and not just something to throw more javascript at with web components.