Foundation CSS Progress Bar with Text
Last Updated :
07 Mar, 2022
Foundation CSS is an open-source & responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to design beautiful responsive websites, apps, and emails that look amazing & can be accessible to any device. It is used by many companies such as Facebook, eBay, Mozilla, Adobe, and even Disney. The framework is built on Saas-like bootstrap. It is more sophisticated, flexible, and easily customizable. It also comes with CLI, so it’s easy to use it with module bundlers. It offers the Fastclick.js tool for faster rendering on mobile devices.
A Progress Bar is used to display the progress of a process. It helps us to visualize how much of the process is complete and how much is left. For this, the percentage is used to display the amount of completion.
Foundation CSS Progress Bar with Text classes:
- progress: This class should be applied to a container. It holds all the progress bar elements.
- progress-meter: This class displays the current progress. The current progress depends on the width of the element.
- progress-meter-text: This class displays the value of the current progress.
Foundation CSS Progress Bar Class attributes:
- aria-valuemin: The minimum value which can be taken by the progress bar.
- aria-valuemax: The maximum value which can be taken by the progress bar.
- aria-valuenow: The current value of the progress bar.
- aria-valuetext: It indicates the human-readable version of the progress bar, in case the progress bar value, is not numeric.
Syntax:
<div class="progress" role="progressbar">
<span class="progress-meter">
<span class="progress-meter-text">Percentage</span>
</span>
</div>
Example 1: Basic example illustrating a progress bar with text in Foundation CSS.
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Foundation CSS Progress Bar with Text</title>
<link rel="stylesheet"
href=
"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/foundation.min.css"
crossorigin="anonymous">
<title>
Foundation CSS Progress Bar with Text
</title>
</head>
<body class="grid-container">
<h2>GeeksforGeeks</h2>
<h4>Foundation CSS Progress Bar with Text </h4>
<div class="success progress"
role="progressbar"
aria-valuenow="50"
aria-valuemin="0"
aria-valuetext="50 percent"
aria-valuemax="100"
style="margin-top: 50px;">
<span class="progress-meter"
style="width: 50%">
<span class="progress-meter-text">50%</span>
</span>
</div>
</body>
</html>
Output:
A Basic progress bar with textExample 2: This example describes the animated progress bar with text in Foundation CSS.
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Foundation CSS Progress Bar with Text</title>
<link rel="stylesheet"
href=
"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/foundation.min.css"
crossorigin="anonymous">
<script src=
"https://cdn.jsdelivr.net/npm/[email protected]/dist/js/foundation.min.js"
crossorigin="anonymous">
</script>
<title>Foundation CSS Progress Bar with Text</title>
</head>
<body class="grid-container">
<h2>GeeksforGeeks</h2>
<h4>Foundation CSS Animated Progress Bar with Text </h4>
<div class="success progress"
role="progressbar"
aria-valuenow="50"
aria-valuemin="0"
aria-valuetext="50 percent"
aria-valuemax="100">
<span class="progress-meter" style="width: 50%">
<span class="progress-meter-text">50%</span>
</span>
</div>
<script>
const recur = () => {
let value = 0;
const progressBar = document.querySelector(".progress");
const progressMeter = document.querySelector(".progress-meter");
const progressText = document.querySelector(".progress-meter-text");
setInterval(() => {
progressBar.ariaValueNow = value;
progressBar.ariaValueText = value + "percent";
progressMeter.style.width = value + "%";
progressText.innerHTML = value + "%";
value = (value + 1) % 100;
console.log(value)
}, 50)
}
recur();
</script>
</body>
</html>
Output:
An animated progress bar with text
References: https://get.foundation/sites/docs/progress-bar.html#with-text
Similar Reads
Foundation CSS Progress Bar Foundation CSS is an open-source & responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to design beautiful responsive websites, apps, and emails that look amazing & can be accessible to any device. It is used by many companies such as Facebook, eBay,
3 min read
Foundation CSS Progress Bar Screen Reader A Foundation is an open-source and responsive front-end framework created by ZURB in September 2011 that makes it simple to create stunning responsive websites, apps, and emails that operate on any device. Many companies, like Facebook, eBay, Mozilla, Adobe, and even Disney, use it. Foundation CSS P
4 min read
Foundation CSS Progress Bar Color Foundation CSS is an open-source & responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to design beautiful responsive websites, apps, and emails that look amazing & can be accessible to any device. It is used by many companies such as Facebook, eBay,
2 min read
Foundation CSS Progress Bar Native Foundation CSS is an open-source and responsive front-end framework created by ZURB in September 2011 that makes it simple to create stunning responsive websites, apps, and emails that operate on any device. Many companies, like Facebook, eBay, Mozilla, Adobe, and even Disney, use it. The framework
2 min read
Foundation CSS Progress Bar Sass Reference Foundation CSS is an open-source & responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to design beautiful responsive websites, apps, and emails that look amazing & can be accessible to any device. It is used by many companies such as Facebook, eBay,
3 min read
Foundation CSS Kitchen Sink Progress Bar Foundation CSS is the frontend framework of CSS that is used to build responsive websites, apps, and emails that work perfectly on any device. It is written using HTML, CSS, and Javascript and is used by many famous companies like Amazon, Facebook, eBay, etc. It uses packages like Grunt and Libsass
2 min read
Foundation CSS Progress Bar Native Meter Foundation CSS is an open-source & responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to design beautiful responsive websites, apps, and emails that look amazing & can be accessible to any device. It is used by many companies such as Facebook, eBay,
4 min read
Semantic-UI Progress Bar Content Semantic UI is an open-source development framework that provides pre-defined classes to make our website look beautiful, amazing, and responsive. It is similar to Bootstrap which has predefined classes. It uses jQuery and CSS to create the interfaces. It can also be directly used via CDN like boots
2 min read
How to Build Tailwind CSS Progress Bar ? Progress bars are essential for managing user expectations during operations like file uploads, downloads, or any process requiring waiting. Integrating progress bars into web applications, emphasizing the simplicity and efficiency that Tailwind CSS offers for designing and implementing these compon
2 min read
How to create progress bar in React JS ? A progress bar shows the measure of progress of any task or activity. It is the graphical representation of progression. Material UI for React has this component available for us and is very easy to integrate. We can Create a straightforward Progress Bar in React JS using the following approach.Prer
2 min read