Circular Progress Bar Web App
About this app
A single page web app featuring a fun, colorful, and responsive circular progress bar.
Circular Progress Bar Web App 0% Increase Progress
Related apps
Put this on your site
Source
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Circular Progress Bar Web App</title>
<meta name="description" content="A single page web app featuring a fun, colorful, and responsive circular progress bar.">
<meta name="keywords" content="progress bar, circular, web app, responsive, colorful">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<script type="text/javascript">
try {
let progress = 0;
function updateProgress() {
const circle = document.querySelector('.progress-ring__circle');
const radius = circle.r.baseVal.value;
const circumference = 2 * Math.PI * radius;
const offset = circumference - progress / 100 * circumference;
circle.style.strokeDashoffset = offset;
document.querySelector(".progress-label").innerText = `${progress}%`;
}
document.addEventListener("DOMContentLoaded", function() {
document.querySelector(".progress-button").addEventListener('click', function() {
if (progress < 100) progress += 10;
else progress = 0;
updateProgress();
});
});
} catch (error) {
throw error;
}
</script>
<style>
.progress-ring {
transform: rotate(-90deg);
background: #eee;
border-radius: 50%;
}
.progress-ring__circle {
stroke: #4C51BF;
stroke-dasharray: 439.823;
stroke-linecap: round;
}
.progress-button {
background: #4C51BF;
color: #ffffff;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
margin-top: 20px;
font-size: 16px;
}
.progress-label {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 2em;
color: #4C51BF;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<svg class="progress-ring" width="120" height="120">
<circle class="progress-ring__circle" stroke="white" stroke-width="4" fill="transparent" r="70" cx="60" cy="60"/>
</svg>
<div class="progress-label">0%</div>
<button class="progress-button">Increase Progress</button>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!