Add a countdown animation to any Webflow website in seconds and display an element when the time is reached.
Whether you're counting down to a special event or highlighting a limited-time offer, this simple solution lets you integrate a countdown with just a few quick attributes. You can also choose to display an element, like a message, once the countdown reaches zero.
Copy the script and paste it into the <head>
section of your custom code settings. If you prefer a quicker setup, you can use our free Webflow Boosters App to install the script and add a demo component to your project instantly.
<!-- Flowbase Booster [Countdown] -->
<script src="https://cdn.jsdelivr.net/npm/@flowbase-co/boosters-countdown@2.0.0/dist/countdown.min.js" type="text/javascript"></script>
Add a ▭ div-block
to your page to contain your countdown elements—days, hours, and minutes. We'll refer to this element as the 'Countdown Wrapper.' Once it's created, select the ▭ div-block
and add the following attributes:
fb-countdown
and Value: true
.fb-countdown-target
and Value: 2024-03-23T11:01:00.000Z
. This is value should be a UTC to the target dateYou can get your UTC time here or use our app to generate it directly in the UI.
Add any text-element
for the parts you want to display, such as days or hours—it's up to you. Place these elements inside the Countdown Wrapper we created in the previous step. To display a value, assign the type attribute as follows:
fb-countdown-type
and Value: days
. This value can be adjusted to display weeks, days, hours, minutes, seconds.As an option, you can set an element to display once the countdown ends. This is useful for showing a message like "Sorry, our sale has ended" or any other details related to the countdown.
To display this element when the countdown reaches zero, follow these steps:
div-block
and name it something like 'Countdown Finished'.display: none
.display: block
and become visible to your customers.To enable this behavior, add the following attribute:
fb-countdown-finsh
and Value: true
Once you've completed all the steps and added the necessary script and attributes, publish your page. Preview your live staging domain to ensure the booster is working as expected.
Your support means the world to us! In just 10 seconds, you can make a big difference:
Thank you for being awesome! 🌟