3.3 KiB
title, menu
| title | menu |
|---|---|
| Countup | docs.countup |
Countups with many options that can be found here
To make countup add data-countup to any html text tag.
Default countup
Set number to count up.
{% capture code %}
30000
{% endcapture %} {% include example.html code=code %}Duration
Set the duration of the countup. (2s is set by default)
{% capture code %}
30000
30000
30000
{% endcapture %} {% include example.html code=code %}Starting value
Set the start value of countup using startVal.
If you set it bigger than the count, countup will run reverse.
{% capture code %}
30000
30000
{% endcapture %} {% include example.html code=code %}Decimal places
Set how many decimal places to show using decimalPlaces.
{% capture code %}
3.123
3.123
3.123
3.123
{% endcapture %} {% include example.html code=code %}Easing
Disable easing using "useEasing": false. (true by default)
{% capture code %}
30000
30000
{% endcapture %} {% include example.html code=code %}Use grouping
Disable grouping using "useGrouping": false. (true by default)
{% capture code %}
30000
30000
{% endcapture %} {% include example.html code=code %}Separator
Set seperator that seperates groups using separator. (, by default)
{% capture code %}
3000000
3000000
3000000
3000000
{% endcapture %} {% include example.html code=code %}Decimal separator
Set decimal separator using decimal. (. by default)
{% capture code %}
3.12
3.12
3.12
3.12
{% endcapture %} {% include example.html code=code %}Prefix
Set countup prefix using prefix.
{% capture code %}
30000
30000
30000
{% endcapture %} {% include example.html code=code %}Suffix
Set countup suffix using suffix.
{% capture code %}
30
30
30
{% endcapture %} {% include example.html code=code %}Of course you can mix all of these:
{% capture code %}
64547834.76
{% endcapture %} {% include example.html code=code %}To do more advanced stuff with countups go here to check how it's done.