I was harping on this in another thread but there is a lot of conditional rendering you can do in CSS these days (for several years at this point) that removes the need for JS or server-side logic (in the case of LiveView) and even state!
If you’re a Tailwind user, you’d do well to read this whole section. It has a very useful appendix.
If you prefer blogs, there is a short intro-type post to this idea here. It’s a Rails blog but the examples are pretty easy to understand if you don’t know Rails. It also uses Tailwind.






















