577 B
577 B
countdown
Countdown gives you a transition effect when you change a number between 0 to 999
Class names
- component:
countdown
Syntax
<span class="countdown">
<span style="--value:{number};">number</span>
</span>
Rules
- The
--valueCSS variable and text must be a number between 0 and 999 - you need to change the span text and the
--valueCSS variable using JS - you need to add
aria-live="polite"andaria-label="{number}"so screen readers can properly read changes