Try it live
Control the progress bar in real-time. Adjust the cart amount and threshold to see messages and animations update instantly.
Add [amount] more to get FREE shipping! 🚚
Different Themes
CSS custom properties make it easy to create any visual style. Here are three approaches.
[amount] away from free delivery
🎯 [amount] more for FREE shipping!
⚡ Only [amount] until TURBO shipping!
Getting Started
Simple HTML setup with full customization through attributes and JavaScript.
Basic Setup
<cart-progress-bar
threshold="75.00"
current="25.50"
money-format="${{amount}}"
message-above="Congratulations! FREE shipping!"
message-below="Add [amount] more for FREE shipping!">
<p data-content-cart-progress-message></p>
<progress-bar></progress-bar>
</cart-progress-bar>Currency Formatting
<!-- US Dollars -->
<cart-progress-bar money-format="${{amount}}" ...>
<!-- Euros with comma separator -->
<cart-progress-bar money-format="{{amount_with_comma_separator}} EUR" ...>
<!-- No decimals -->
<cart-progress-bar money-format="${{amount_no_decimals}}" ...>
<!-- Shopify Liquid integration -->
<cart-progress-bar money-format="{{ shop.money_format }}" ...>JavaScript API
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);Custom Styling
cart-progress-bar {
/* Colors */
--cart-progress-bar-bg: #e9ecef;
--cart-progress-bar-fill-before: #28a745;
--cart-progress-bar-fill-after: #007bff;
/* Structure (optional) */
--cart-progress-bar-height: 16px;
--cart-progress-bar-border-radius: 8px;
}What you get
Template-based messages with [amount] placeholders. Supports Shopify money formats and multi-currency.
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.