Design a custom loading screen in Bubble by creating a full-page overlay group with branded visuals and an animated spinner, then hiding it when data finishes loading using the Page is loaded event. This gives users a polished first impression instead of watching elements pop in one by one.
Overview: Designing a Custom Loading Screen in Bubble
This tutorial shows you how to build a branded loading screen in Bubble that displays while your page data loads. You will create a full-page overlay group, add your logo and a CSS-animated spinner, trigger the hide animation when the page finishes loading, and handle edge cases for slow data. This is essential for apps with complex pages where elements load sequentially.
Prerequisites
- A Bubble account with an existing app
- Your brand logo or icon image
- Basic understanding of Bubble's Design tab and Groups
- Familiarity with workflows and the Page is loaded event
Step-by-step guide
Create the loading overlay group
Create the loading overlay group
Go to the Design tab and open the page where you want a loading screen. Click the + icon, search for Group, and drag it onto the page. Name it Group Loading Screen. Set it to a Fixed layout with width and height both at 100% of the page. Set the background color to match your brand (or white). Set the z-index to a high value (999) by right-clicking and selecting Bring to front repeatedly or using the Element Tree to ensure it sits above everything. Check Visible on page load.
Expected result: A full-page overlay group covers the entire page and is visible when the page first loads.
Add your brand logo and spinner
Add your brand logo and spinner
Inside Group Loading Screen, add an Image element centered vertically and horizontally. Upload your brand logo or icon. Below it, add an HTML element for a CSS-animated spinner. In the HTML element, paste a CSS spinner code that creates a rotating circle animation. Size the HTML element to about 40x40 pixels and center it below the logo.
1<style>2.spinner {3 width: 40px;4 height: 40px;5 border: 4px solid #e0e0e0;6 border-top: 4px solid #3498db;7 border-radius: 50%;8 animation: spin 1s linear infinite;9}10@keyframes spin {11 0% { transform: rotate(0deg); }12 100% { transform: rotate(360deg); }13}14</style>15<div class="spinner"></div>Pro tip: Change #3498db to your brand's primary color for a cohesive look.
Expected result: The loading screen shows your logo above a smoothly rotating spinner animation.
Hide the loading screen when the page loads
Hide the loading screen when the page loads
Go to the Workflow tab and create a new workflow: When Page is loaded (entire page). Add an action: Element Actions then Hide Group Loading Screen with an animation (Fade out works well, set to 300-500ms). The Page is loaded event fires when all page elements and initial data sources have finished loading. The fade-out provides a smooth transition from the loading screen to the actual page content.
Pro tip: Use the Animate element action with a fade-out instead of just toggling visibility for a more polished transition.
Expected result: The loading screen smoothly fades out once the page and its data have finished loading.
Handle slow data loads with additional conditions
Handle slow data loads with additional conditions
For pages with heavy data loads, the Page is loaded event may fire before all Repeating Group data is ready. To handle this, add a fallback: create a Do when condition is true workflow that checks if your main Repeating Group's list count > 0. When true, hide the loading screen. Also add a safety timeout: use a workflow triggered by Page is loaded that schedules a custom event to hide the loading screen after 5 seconds maximum, ensuring the loading screen never gets stuck indefinitely.
Expected result: The loading screen hides either when data is ready or after a maximum timeout, whichever comes first.
Complete working example
1CUSTOM LOADING SCREEN — WORKFLOW SUMMARY2==========================================34PAGE ELEMENTS:5 Group Loading Screen6 Layout: Fixed7 Width: 100%8 Height: 100%9 Background: #FFFFFF (or brand color)10 Z-index: 999 (front of all elements)11 Visible on page load: YES12 Children:13 - Image: Brand logo (centered)14 - HTML Element: CSS spinner animation15 - Text: "Loading..." (optional)1617CSS SPINNER CODE (in HTML element):18 <style>19 .spinner {20 width: 40px;21 height: 40px;22 border: 4px solid #e0e0e0;23 border-top: 4px solid #3498db;24 border-radius: 50%;25 animation: spin 1s linear infinite;26 }27 @keyframes spin {28 0% { transform: rotate(0deg); }29 100% { transform: rotate(360deg); }30 }31 </style>32 <div class="spinner"></div>3334WORKFLOW 1: Hide on page load35 Event: Page is loaded (entire page)36 Action 1: Animate Group Loading Screen37 Animation: Fade out38 Duration: 400ms39 Action 2: Hide Group Loading Screen40 (after animation completes)4142WORKFLOW 2: Data-dependent hide (optional)43 Event: Do when condition is true44 Condition: RepeatingGroup Main's List of Things:count > 045 Run once: yes46 Action: Animate + Hide Group Loading Screen4748WORKFLOW 3: Safety timeout49 Event: Page is loaded50 Action: Schedule custom event hide_loading51 Delay: 5 seconds52 Custom event hide_loading:53 Only when: Group Loading Screen is visible54 Action: Animate + Hide Group Loading ScreenCommon mistakes when designing a custom loading screen in Bubble.io: Step-by-Step Guide
Why it's a problem: Forgetting to set Visible on page load for the loading group
How to avoid: Check the Visible on page load checkbox on Group Loading Screen in the Property Editor.
Why it's a problem: Not adding a safety timeout
How to avoid: Add a scheduled custom event that hides the loading screen after 5-10 seconds as a fallback.
Why it's a problem: Setting the loading group z-index too low
How to avoid: Use Bring to front in the right-click menu or ensure the loading group is the last element in the Element Tree.
Best practices
- Use your brand colors and logo for a professional, consistent loading experience
- Add a fade-out animation (300-500ms) for a smooth transition instead of instant hide
- Include a safety timeout to prevent the loading screen from ever getting stuck
- Keep the spinner simple — complex animations increase page weight and defeat the purpose
- Set the overlay z-index high enough to cover all page elements
- Test on slower connections to verify the loading screen displays long enough to be useful
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
I am building a Bubble.io app and want a custom branded loading screen that shows while the page data loads, then fades out smoothly. How do I create the overlay, add a CSS spinner, and trigger the hide on the Page is loaded event?
Add a custom loading screen to my main page. Create a full-page overlay group with my logo and a spinning animation. Hide it with a fade-out when the page finishes loading, and add a 5-second safety timeout.
Frequently asked questions
Does the loading screen affect SEO?
Minimally. Search engine crawlers process the page HTML, not the visual rendering. However, if important content is hidden behind the overlay for too long, it could affect perceived performance metrics.
Can I use a GIF instead of CSS animation?
Yes. Replace the HTML spinner element with an Image element containing an animated GIF. However, CSS animations are lighter weight and more customizable.
Will this work on mobile devices?
Yes. The 100% width and height settings ensure the overlay covers the full screen on all device sizes. Test at mobile breakpoints to verify the logo and spinner are centered.
Can I show a progress bar instead of a spinner?
A true progress bar is difficult because Bubble does not expose page load percentage. You can simulate it with a timed animation that fills over 2-3 seconds, but it is decorative rather than accurate.
Does the loading screen cost workload units?
No. The loading screen uses only client-side elements (Groups, HTML, conditionals) which do not consume workload units.
Can RapidDev help with performance optimization?
Yes. RapidDev specializes in Bubble development and can help optimize page load performance, implement advanced loading patterns, and ensure your app feels fast on all devices.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation