/bubble-tutorials

How to create a reading progress indicator in Bubble.io: Step-by-Step Guide

Learn to add a reading progress indicator in Bubble.io with our easy step-by-step guide. Elevate user experience on your site effectively.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web or mobile app? RapidDev builds Bubble apps with your growth in mind.

Book a free No-Code consultation

How to create a reading progress indicator in Bubble.io?

Creating a Reading Progress Indicator in Bubble.io

 

Creating a reading progress indicator in Bubble.io enables you to enhance user experience by visually demonstrating how much of a page has been read. This feature is particularly useful for content-heavy pages such as blogs or articles. The following guide walks you through a detailed step-by-step process of implementing a reading progress indicator in your Bubble.io application.

 

Prerequisites

 

  • Access to a Bubble.io account with an active project where you want to implement the reading progress indicator.
  • Basic understanding of creating elements and workflows in Bubble.io.
  • An understanding of HTML, CSS, and Javascript may be beneficial but is not strictly necessary.

 

Understanding the Reading Progress Indicator

 

  • A reading progress indicator visually represents the portion of content users have read as they scroll down the page.
  • The indicator typically appears as a horizontal bar at the top or bottom of the screen that fills up as the user scrolls towards the end of the content.

 

Setting Up the Design Elements in Bubble.io

 

  • Open your Bubble.io project and navigate to the page you want to add the reading progress indicator.
  • Add a 'Shape' element to the page to act as the container for the progress bar. This is usually a thin rectangle that sits at the top of your page.
  • Set the shape’s background to the color you want for the progress bar (e.g., blue or green).
  • Ensure that this shape is positioned at the top of your page and stretches fully from left to right. You may position it within a floating group to keep it fixed at the top as users scroll.

 

Adding the Necessary Plugins and Code

 

  • Navigate to the Plugins tab in Bubble.io and install the "Toolbox" plugin. This will allow you to use JavaScript within your Bubble app, which is necessary for tracking scrolling.
  • Go back to your page and add an “HTML” element where you’ll write a short JavaScript to track scroll progress.
  • In the HTML element, paste the following code snippet to calculate and set the width of the progress bar based on scroll position:
    <pre>
    <script>
      $(document).ready(function(){
        $(window).on('scroll', function() {
          var scrollTop = $(this).scrollTop(); 
          var documentHeight = $(document).height();
          var windowHeight = $(this).height();
          var scrollPercent = (scrollTop / (documentHeight - windowHeight)) \* 100;
          
          // Get the shape element by its unique ID
          $('#ProgressBarShape').css('width', scrollPercent + '%');
        });
      });
    </script>
    </pre>
    
  • Replace `ProgressBarShape` with the unique ID of your shape element. This can be set in the element’s properties.

 

Configuring Workflows and Testing

 

  • You don’t need additional workflows for the reading progress indicator, as the JavaScript will automatically update the progress bar based on the user’s scrolling.
  • Preview your Bubble.io application to test the progress indicator. As you scroll down, you should see the progress bar fill up from left to right.
  • Ensure the progress bar is smooth and accurately represents the scroll position. Adjust the position and design of the progress bar's shape if needed.

 

Publishing and Finalizing

 

  • Once satisfied with the appearance and functionality, return to the editor and ensure all changes are saved.
  • If applicable, repeat these steps on other pages to include the progress indicator throughout your application.
  • Publish your application to deploy the changes to your live site, testing again to ensure that the indicator works across different devices and screen sizes.

 

By following these detailed steps, you can integrate a reading progress indicator into your Bubble.io application, enhancing user experience by visually showing how much content is left to read. This feature can increase user engagement and improve the overall design of your platform.

Explore More Valuable No-Code Resources

No-Code Tools Reviews

Delve into comprehensive reviews of top no-code tools to find the perfect platform for your development needs. Explore expert insights, user feedback, and detailed comparisons to make informed decisions and accelerate your no-code project development.

Explore

WeWeb Tutorials

Discover our comprehensive WeWeb tutorial directory tailored for all skill levels. Unlock the potential of no-code development with our detailed guides, walkthroughs, and practical tips designed to elevate your WeWeb projects.

Explore

No-Code Tools Comparison

Discover the best no-code tools for your projects with our detailed comparisons and side-by-side reviews. Evaluate features, usability, and performance across leading platforms to choose the tool that fits your development needs and enhances your productivity.

Explore

By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.

Cookie preferences