Yeah, the "HTML Web Components" can be useful: https://adactio.com/journal/20618 and https://blog.jim-nielsen.com/2023/html-web-components/
> You just take some normal HTML markup, wrap it with a custom element, and then write some JS to add capabilities which you can then style with regular CSS! Everything’s of the Light Side of the Web. No need to pierce the Vale of Shadows or whatever.
Ah ! Yes, that's basically me.