Framework for small bits of interactivity on otherwise static page?

One thing that web components frameworks enable is adding a small bit of interactivity to an otherwise static page. Either strictly static, or from a static-site-builder, or from a CMS. Are there other frameworks that work well for that application? From my attempts on the angular playground, it looks like you can do it, at least with the most recent angular.
6 Replies
DogPawHat
DogPawHat3mo ago
Astro. You want Astro. Or Nextjs with server components maybe.
DogPawHat
DogPawHat3mo ago
Docs
Islands architecture
Learn about how Astro's islands architecture helps keep sites fast.
Kyle Butt
Kyle ButtOP3mo ago
Perhaps. Maybe it's worth it to write a backend for frontend and put it in front of whatever is serving HTML. If I had a lot of heavy components and needed to selectively load them, it might make sense. I'm not sure I need that at the moment.
Ani
Ani3mo ago
Yup +1 on astro You can write code in react/angular/whatever you prefer and use it for the parts that need interactoin
bythewayitsjosh
bythewayitsjosh3mo ago
Saw the title, immediately thought of Astro. Very versatile with a strong focus on static content.
Eoghan
Eoghan3mo ago
If you’re not interested in Astro as others have mentioned, maybe Svelte would be more to your liking? You can serve everything with Sveltekit and it’s about as close as you can get to just writing vanilla html and css with a little bit of syntactic sugar on top for the reactivity and you still get all the modern deployment niceties that you wouldn’t get by just writing it all out and throwing it up on a VPS.

Did you find this page helpful?