How to Create a Remaining Spots Counter in Webflow
Learn how to create a dynamic urgency-based remaining-spots counter in Webflow to boost conversions.
In this tutorial, Sandro, cofounder of Gemeos Webflow agency, shows you how to create a remaining-seats counter with expiration in Webflow to build urgency and increase conversions.
Example
Simulate different urgency levels
Early Access—/ 20 spots
Status
Remaining spots
Color
Message
Available
8 to 20
Green (#22c55e)
X spots available
Tension
4 to 7
Orange (#f59e0b)
X spots left, book now
Urgency
1 to 3
Red (#ef4444)
Only X spot(s) left!
Full
0
Red (#ef4444)
Join the waitlist
1. Create the elements in Webflow
Create a Text Block seats-left for the number of spots. Create a Div seats-bar-track (gray background, 6px height, border-radius) containing a Div seats-bar (width: 0%, height: 100%). Create a Text Block seats-message for the contextual message.
2. Connect it to a real data source
In production, replace localStorage with a fetch to your API, Airtable, or Google Sheets. Example with Airtable:
fetch('https://api.airtable.com/v0/YOUR_BASE/Registrations?fields[]=Status', { headers: { 'Authorization': 'Bearer YOUR_KEY' } }) .then(function(r) { return r.json(); }) .then(function(data) { var taken = data.records.filter(function(r) { return r.fields.Status === 'Confirmed'; }).length; // Update the UI with taken });
3. Add the script in Footer code
(function() { var el = document.getElementById('seats-left'); var bar = document.getElementById('seats-bar'); var msg = document.getElementById('seats-message'); if (!el) return;
// Configuration var TOTAL = 20; var KEY = 'seats-taken-' + window.location.pathname;
// Retrieve or initialize the counter (simulated on the client side) // In production: replace with a fetch to your API var taken = parseInt(localStorage.getItem(KEY) || Math.floor(Math.random() * 8 + 10)); localStorage.setItem(KEY, taken);
var left = Math.max(0, TOTAL - taken); var pct = Math.round((taken / TOTAL) * 100);
el.textContent = left;
if (bar) { bar.style.width = pct + '%'; bar.style.background = left <= 3 ? '#ef4444' : left <= 7 ? '#f59e0b' : '#22c55e'; }
if (msg) { if (left === 0) { msg.textContent = 'Full — join the waitlist'; msg.style.color = '#ef4444'; } else if (left <= 3) { msg.textContent = 'Only ' + left + ' spot' + (left > 1 ? 's' : '') + ' left!'; msg.style.color = '#ef4444'; } else if (left <= 7) { msg.textContent = left + ' spots left — book now'; msg.style.color = '#f59e0b'; } else { msg.textContent = left + ' spots available'; msg.style.color = '#22c55e'; } } })();
good to know
To create a real expiration for the spots, combine this script with a timestamp: store the offer end date and display a countdown. When the countdown hits zero, replace the spots counter with an "Offer expired" message. Together, these two mechanisms — quantitative urgency and time-based urgency — are the most effective on conversion pages.
Conclusion
The remaining-spots counter is one of the most effective conversion tools. Use cases:
Webinars with a limited number of participants
Limited-seat support offers
Early access or beta access with a quota
Good to know
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.