Blaze UI Counter Events
Blaze UI is an open-source lightweight CSS UI toolkit that provides great tools for building customized and scalable applications. It can work with any framework that exists. It can adapt to any ecosystem. All designs or CSS are mobile-first and hence responsive.
Blaze UI Counter is used to display a number that acts as a counter. We can set it to a countdown counter or a stopwatch according to our needs. We can add delay, start and end values, stop, start, update and reset.
Syntax: Create a counter as follows:
<blaze-counter class="u-super u-text--mono" auto-start start-value=val end-value=val delay=num duration="5" id="counter" ></blaze-counter>
Blaze UI Counter Events:
- auto-start: This field takes a boolean type of value and asks if the timer should start automatically or not.
- start-value: This field asks for the value from which to start the counter.
- end-value: This field asks for the value where the counter will end.
- duration: This field asks for the duration in seconds the counter is going to last.
- delay: This field asks for the duration in milliseconds the counter is going to start.
- decimals: This field asks for the number of decimal places to show when the counter starts.
- completed: This callback is called when the end value is reached.
Example 1: In the following example, we have a counter that ends on 0.
Example 2: In the following example, we have a delay in our counter.