Animated Multi-Step Progress Bar

Developer
Size
3,802 Kb
Views
210,496

How do I make an animated multi-step progress bar?

What is a animated multi-step progress bar? How do you make a animated multi-step progress bar? This script and codes were developed by Jon Milner on 09 December 2022, Friday.

Animated Multi-Step Progress Bar Previews

Animated Multi-Step Progress Bar - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Animated Multi-Step Progress Bar</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Montserrat'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <ul class="steps"> <li class="step step--incomplete step--active"> <span class="step__icon"></span> <span class="step__label">Step 1</span> </li> <li class="step step--incomplete step--inactive"> <span class="step__icon"></span> <span class="step__label">Step 2</span> </li> <li class="step step--incomplete step--inactive"> <span class="step__icon"></span> <span class="step__label">Step 3</span> </li> <li class="step step--incomplete step--inactive"> <span class="step__icon"></span> <span class="step__label">Step 4</span> </li>
</ul> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Animated Multi-Step Progress Bar - Script Codes CSS Codes

/* Mixins */
/* Color Variables */
/* Theme Variables */
/* Animations */
@-webkit-keyframes bounce { 0% { -webkit-transform: scale(1); transform: scale(1); } 33% { -webkit-transform: scale(0.9); transform: scale(0.9); } 66% { -webkit-transform: scale(1.1); transform: scale(1.1); } 100% { -webkit-transform: scale(1); transform: scale(1); }
}
@keyframes bounce { 0% { -webkit-transform: scale(1); transform: scale(1); } 33% { -webkit-transform: scale(0.9); transform: scale(0.9); } 66% { -webkit-transform: scale(1.1); transform: scale(1.1); } 100% { -webkit-transform: scale(1); transform: scale(1); }
}
/* Base Styles */
html { font-size: 16px;
}
html,
body { height: 100%;
}
body { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; background-color: #292627; color: #e6e7e8; font-family: 'Montserrat', sans-serif;
}
/* Component Styles - Steps */
.steps { display: -webkit-box; display: -ms-flexbox; display: flex; width: 100%; margin: 0; padding: 0 0 2rem 0; list-style: none;
}
.step { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-flex: 1; -ms-flex: 1; flex: 1; position: relative; pointer-events: none;
}
.step--active, .step--complete { cursor: pointer; pointer-events: all;
}
.step:not(:last-child):before, .step:not(:last-child):after { display: block; position: absolute; top: 50%; left: 50%; height: 0.25rem; content: ''; -webkit-transform: translateY(-50%); transform: translateY(-50%); will-change: width; z-index: -1;
}
.step:before { width: 100%; background-color: rgba(230, 231, 232, 0.25);
}
.step:after { width: 0; background-color: #ff2267;
}
.step--complete:after { width: 100% !important; opacity: 1; -webkit-transition: width 0.6s ease-in-out, opacity 0.6s ease-in-out; transition: width 0.6s ease-in-out, opacity 0.6s ease-in-out;
}
.step__icon { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; position: relative; width: 3rem; height: 3rem; background-color: #292627; border: 0.25rem solid rgba(230, 231, 232, 0.25); border-radius: 50%; color: transparent; font-size: 2rem;
}
.step__icon:before { display: block; content: '\2713';
}
.step--complete.step--active .step__icon { color: #fff; -webkit-transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out, color 0.3s ease-in-out; transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out, color 0.3s ease-in-out;
}
.step--incomplete.step--active .step__icon { border-color: #ff2267; -webkit-transition-delay: 0.5s; transition-delay: 0.5s;
}
.step--complete .step__icon { -webkit-animation: bounce 0.5s ease-in-out; animation: bounce 0.5s ease-in-out; background-color: #ff2267; border-color: #ff2267; color: #fff;
}
.step__label { position: absolute; bottom: -2rem; left: 50%; margin-top: 1rem; font-size: 0.8rem; text-transform: uppercase; -webkit-transform: translateX(-50%); transform: translateX(-50%);
}
.step--incomplete.step--inactive .step__label { color: rgba(230, 231, 232, 0.25);
}
.step--incomplete.step--active .step__label { color: #fff;
}
.step--active .step__label { -webkit-transition: color 0.3s ease-in-out; transition: color 0.3s ease-in-out; -webkit-transition-delay: 0.5s; transition-delay: 0.5s;
}

Animated Multi-Step Progress Bar - Script Codes JS Codes

$('.steps').on('click', '.step--active', function() { $(this).removeClass('step--incomplete').addClass('step--complete'); $(this).removeClass('step--active').addClass('step--inactive'); $(this).next().removeClass('step--inactive').addClass('step--active');
});
$('.steps').on('click', '.step--complete', function() { $(this).removeClass('step--complete').addClass('step--incomplete'); $(this).removeClass('step--inactive').addClass('step--active'); $(this).nextAll().removeClass('step--complete').addClass('step--incomplete'); $(this).nextAll().removeClass('step--active').addClass('step--inactive');
});
Animated Multi-Step Progress Bar - Script Codes
Animated Multi-Step Progress Bar - Script Codes
Home Page Home
Developer Jon Milner
Username jonmilner
Uploaded December 09, 2022
Rating 4
Size 3,802 Kb
Views 210,496
Do you need developer help for Animated Multi-Step Progress Bar?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Jon Milner (jonmilner) Script Codes
Create amazing captions with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!