How to add a loading animation to your turbo frame with TailwindCSS | Arkency Blog
21-Mar-2024 648
How to add a loading animation to your turbo frame with TailwindCSS Ever been working on a project and hit a snag? That’s what happened to me recently. I came across a turbo frame that was slow to load and didn’t show any signs of loading. The easiest way to add a loading state to the turbo frame is to insert the loader inside the frame tag. Problem is that it only works on the very first load, after that you’ll see the old content until the new one fully loads.I did some digging and found out that turbo frames actually have states, which can be useful: one when they’re loading busy and one when they’re done complete. They’re represented by an HTML attribute and can be used to create the proper CSS selector.
How to add a loading animation to your turbo frame with TailwindCSS | Arkency Blog #ruby #rubydeveloper #rubyonrails #loading #animation #turbo #frame #TailwindCSS #Arkency #blog #tailwindcss #turbo https://rubyonrails.ba/link/how-to-add-a-loading-animation-to-your-turbo-frame-with-tailwindcss-arkency-blog