Learn Bubble with 500+ tutorials, courses & AI Assistant ✨

Limited time launch offer get $80 off today

0 days 0 hours 0 minutes 0 seconds
SAVE $80 NOW
Planet No Code logo
Bubble.io CoachingFounder MentoringSponsorships
LoginLearn Bubble.io

OpenAI Loading Animation - Using CSS

In this Bubble tutorial we demonstrate how to improve your Bubble app's UX (user experience) by showing a loading animation while you wait for a response from the OpenAI API (ChatGPT). This tutorial uses a CSS animation from loading.io.

Join now $19/monthLearn more
Get 500+ tutorials, a No-Code AI Assistant, 4 premium courses, and everything you need to build faster!
OpenAI Loading Animation - Using CSS
Explore these topics...
Element Actions > Hide
Element Actions > Show
HTML
This element is visible on page load
OpenAI
Custom CSS

With just this tutorial learn...

Enhance user experience: Learn how to add a loading animation while waiting for OpenAI responses in Bubble!

Boost app performance: Discover how to provide visual feedback without impacting page load times using CSS animations.

Improve API integration: Master the art of integrating OpenAI with Bubble and learn to handle API responses effectively.

With membership you'll...

Learn how to build a ChatGPT Clone, Custom CRM for your business & SaaS Marketing website with Webflow & AI.

Unlock 500+ Bubble tutorial videos with AI powered Q&A.

Debug your Bubble app instantly with our custom trained No Code AI Assistant.

Join now $19/month
Risk-free! 14-day money-back guarantee. Cancel anytime.

Integrating OpenAI with Bubble

There's a question we've been asked a lot about integrating your Bubble app with the OpenAI API to generate AI content. And that is, can you make OpenAI quicker? The short answer is no, because that's down to their servers and their service. But you can offer your users visual feedback to tell them that something is happening. And this is particularly useful because Bubble doesn't support the OpenAI text streaming protocol, at least not yet. So in this video, I'm going to show you how you can provide your users with a loading animation while you wait on OpenAI and then remove the animation when you're done.

Exclusive Bubble Tutorials

And if you're learning Bubble, you need to check out our website planetnocode.com because we've got videos on there exclusive to our members that you cannot find on YouTube. We've got hundreds of videos available at planetnocode.com.

Using Loading.io for Animations

So I'm going to, in this demonstration, use a loading animation from loading.io. And I like them because they've got a lot of choice here. There are a lot of free ones. But you can also export in a number of different formats. And I'm going to demonstrate how you can do it with CSS. And I like doing it with CSS because you're not going to experience the pixelation. You might experience with a GIF. It's always going to be crisp. And also, it's not going to have the impact on page load that loading an image or a series of images might take, which is what's required if you're loading in any other form of animated image.

Setting Up the Demo

So I've got my demo here. And basically, when I click Submit, I want to show loading and then I want to show the results. So let's add in a HTML elements because this is going to be my loading animation. And go into loading. And then I click on CSS. And then free download. I'm going to copy this into here. And just play with this a little bit.

Adjusting the Animation Size

Okay, so I'm going to eyeball this, but obviously you could make the design a lot cleaner. It's probably going to be more like 120. Way too small. Yeah. And then we just need a little bit more extra height. Obviously, this is going to depend on the size of the CSS element. You might need to tinker slightly with some of the code in here. But anyway, I just want to make sure that it's now all visible. Let's just get this in the sensible range. Okay, that's going to work just fine.

Configuring Visibility

So now if I click Preview, the loading animation is going to be visible by default and so is my text error. So instead, I'm going to tell this one to not be visible on page load and to collapse when empty. And the same with here. Not be visible on page load, collapse when empty.

Creating the Workflow

And then on Submit, I'm going to add two additional actions into my workflow. One is to show element. So I'm going to show my HTML element because that's where my loading CSS animation is. And I'm going to put that up front. I'm then going to put here, which is... So OpenAI makes the call. This is where the waiting happens. This is where the response is saved. In this case, I'm using a custom state. And so I can here, I can say Show... Which one is it? Multiline input. That's where I'm displaying my response. And then I can hide the HTML. Let's try that.

Testing the Implementation

So I'm going to fill in my form and we'll say again, which is better, WordPress or Bubble. For those of you who don't know, I come from a WordPress background and I love them both equally. But let's see what OpenAI says on the topic.

Enhancing User Experience

So you can see that the loading animation has come in now. And it's going to stay there while OpenAI takes its time. If you really wanted to offer an incredible user experience, you could look at how OpenAI's response time is dependent on the number of tokens that you send and receive. And there are plugins available in Bubble which will calculate the tokens. I think you also get the tokens back when you send the OpenAI response, although they only come at the end.

Estimating Response Time

Anyway, the point being is that if you know the number of tokens, you can make a rough estimate of the amount of time, which means that you could display a progress bar that very roughly takes the amount of time to progress, required to get your response back.

Conclusion

Anyway, there you have it. That is how you can add in a UI element to improve the user experience in your Bubble app. If you're using Bubble and OpenAI by adding in a loading animation.

Table of contents

Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Your No-Code Journey Starts Here

The best way to learn Bubble.io?

Build No Code Confidently

No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.

Find every solution in one place

No more searching across platforms for tutorials. Our bundle has everything you need, with 500+ videos covering every feature and technique.

Dive deep into every detail

Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.

Monthly
Yearly
Member
Accelerate your Bubble app to launch
$99 / month
$19/month/mo
Includes:
500+ tutorials
4 premium courses
Find the right tutorial with our custom trained AI
New tutorials added each week
Cancel anytime
14 day money back
Join now
Member
Accelerate your Bubble app to launch
$990 / year
$149/year/mo
Includes:
500+ tutorials
4 premium courses
Find the right tutorial with our custom trained AI
New tutorials added each week
Cancel anytime
14 day money back
Join now

Frequently Asked Questions

Find answers to common questions about our courses, tutorials & content.

Do I need any coding experience?

No. Our Beginner Essentials course and AI No-Code Coach are designed for total newcomers. You’ll learn Bubble.io step by step - no coding required.

How does the AI No-Code Coach work?

Simply type your question in plain English, and our AI taps into the entire video library to recommend the exact lessons you need. It’s like having a personal instructor on demand.

How long can I access the content?

As long as you’re subscribed! With our monthly subscription, you get unlimited access to all 500+ videos, our growing course library, and the AI No-Code Coach.

What courses are included

Your subscription includes:

  • Bubble Beginner Essentials – Get up and running fast.
  • Build a ChatGPT Clone – Integrate AI into your no-code apps.
  • Build Your SaaS Website with AI – Learn to create a scalable startup site.
  • Develop a Custom CRM App in Bubble - Learn database relationships with a CRM.

Plus, new tutorials every week!

What if I get stuck on a lesson?

The AI No-Code Coach is your first stop for instant answers. If you need deeper help, you can book 1:1 Bubble coaching for expert guidance.

Do you offer a money-back guarantee?

Yes! If you don’t see real progress within 14 days, let us know, and we’ll issue a full refund—no questions asked.

Can I cancel anytime?

Absolutely. Your subscription is month-to-month, and you can cancel anytime—no lock-ins, no hidden fees.

What if I want more than just tutorials & courses?

Absolutely. Your subscription is month-to-month, and you can cancel anytime—no lock-ins, no hidden fees.

If you’re serious about building a successful SaaS startup, check out Mastery—our intensive mentorship program. Mastery goes beyond Bubble.io development and includes:

  1. 1:1 mentorship to fast-track your progress
  2. Marketing strategies tailored for no-code founders‍
  3. Product management insights to scale your startup‍
  4. Personalized support from experienced founders

‍

Still have questions?

Reach out to our dedicated team.

Contact
Services
Search Bubble TutorialsBubble.io CoursesBook Bubble.io CoachingApply for Mastery
Latest Bubble tutorials
Rerank Text By MEANING With Cohere In Bubble.io Step by Step!
Unlock RAG Providers for NO CODE AI App Development TODAY!
Better Tables with Built-in Search and Sort By in Bubble.io
Partnerships
Flusk.eu
VectorShift
Comnoco
Plumb
Toddle
Whereby
Get started with no code
AI Powered No Code AppsNo Code Web ScrapingBubble.io Plugin tutorialsBubble API Connector tutorialsStudent & Teacher DiscountBest tools for no coders
Follow us
Youtube
X
LinkedIn
Planet No Code logo
In partnership with
Queen Mary University of London Logo
© 2024 Planet No Code. All rights reserved.
Privacy PolicyTerms of ServiceCookies SettingsContact Us