SpinKit Loading Animations

I saw this post last week and thought that the animated loading indicators were really cool.

It’s a good post, and recreating them all from scratch Xojo would be great exercise, but I wanted to use some of the other ones and wanted to take the easy road.

I figured that I should be able to just display the animations in an HTML viewer, so I put together a class to do that. It’s unfortunately Mac only and requires MBS plugins because I couldn’t find a way to make the Xojo HTMLViewer transparent. (let me know if I missed something here)

https://www.dropbox.com/scl/fi/nqbkh3087ymkukxcf0q0t/SpinKit-Class.xojo_binary_project?rlkey=4rfjibe3iy69u96jvw9b5e86n&st=0w26nxtt&dl=0

Full credit to Tobias Ahlin for the animations and a shoutout to ChatGPT for some tweaks since I know little to nothing about CSS and web dev in general.

4 Likes

Thanks for sharing! One of the several benefits of doing it in an HTMLViewer is that it can still animate while your main thread is busy or the framework is otherwise in a blocking operation. If anyone has a solution for Windows, I and I’m sure many others would love to see it.