Control the cart progress bar in real-time. Adjust the cart amount and minimum threshold to see how the progress bar and messages update.
Add {{ amount }} more to get FREE shipping! 🚚
Examples of different visual themes you can create with CSS custom properties.
{{ amount }} away from free delivery
🎯 {{ amount }} more for FREE shipping!
âš¡ Only {{ amount }} until TURBO shipping!
<cart-progress-bar
threshold="75.00"
current="25.50"
message-above="🎉 Congratulations! You've qualified for FREE shipping!"
message-below="Add {{ amount }} more for FREE shipping!">
<p data-content-cart-progress-message>Add {{ amount }} more for FREE shipping!</p>
<progress-bar></progress-bar>
</cart-progress-bar>
const progressBar = document.querySelector('cart-progress-bar');
// Set progress percentage directly
progressBar.setPercent(67);
// Update cart amount
progressBar.setCurrentAmount(45.50);
// Change threshold
progressBar.setThresholdAmount(100.00);
// Get current progress info
const info = progressBar.getProgress();
console.log(info.percent, info.isComplete, info.thresholdAmount);
cart-progress-bar {
--cart-progress-bar-height: 16px;
--cart-progress-bar-fill-bg: #ff6b6b;
--cart-progress-bar-border-radius: 8px;
--cart-progress-message-font-size: 1rem;
}
Template-based messages with automatic currency formatting and show/hide logic based on completion status.
CSS custom properties for colors, sizing, fonts, and spacing. Easy theming support.
Mobile-optimized with responsive breakpoints and touch-friendly interactions.
Buttery smooth transitions with completion shine effects and progress level indicators.
Drop-in web component that works with any framework. Clean JavaScript API for dynamic updates.