All threads / How do I add a loading spinner and bar like this site?

Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do I add a loading spinner and bar like this site?

Enrique Benitez asked in General

I know it's a turbolinks feature but I don't know how to make it appear or how to do it, it's pretty nice the way GoRails handles the loading with that spinner and bar, how is it done?

Thanks in advance!

Hey Enrique! I'm actually just using the stock Turbolinks progress bar that's builtin. I think the only thing you have to do is add a little CSS to make sure that it displays.

https://github.com/turbolinks/turbolinks-classic#progress-bar

Also if you're using Turbolinks 5 (I've yet to upgrade) then I think it also has the same progress bar.

Thank you Chris! I got it working now.
Easy task, yeah just needed to add the CSS :)

Super nice that it's included in the library isn't it? :D

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 33,665+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.