This is so easy to do with Rails via
https://hotwired.dev/Anything that wouldn't require a round trip for data can be scripted pretty simply just using Stimulus.
I can't imagine it's any harder with any of the other server side technologies like Liveview, Blazor, etc.