Phoenix Files
Read post

My Favorite new LiveView Feature

Phoenix LiveView v0.20.4 introduced a new feature called JS.toggle_class/1, which allows for easy class toggling on DOM elements. This feature is versatile and can be used for basic visibility toggling, toggling multiple elements at once, and toggling animations.

    #webdev#javascript#tailwind-css#liveview
May 21, 2024•5m read time•From fly.io
Post cover image
Table of contents
Basic visibilityToggle multiple elements at onceToggle with animationsDynamic items in a listReusing the click eventDiscussion
22 Impressions
Phoenix Files's image
Phoenix Files

Phoenix Files is a blog dedicated to the Phoenix web framework for Elixir, offering tutorials, guide...

38 Followers

•

14 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard