Provides a field formatter that integrates the countUp.js library.
The field formatter can be used on integer, float and decimal fields.
Field formatters can be applied in the display settings of an entity, for example.
Module Dependencies
For the module to work, you need to add the countup-js library to your projects libraries folder.
You can either do this manually or use composer merge plugin for this.
Installation with composer merge plugin
1. Add the repository to your composer.json file. It should look something like this:
{
[...]
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "package",
"package": {
"name": "inorganik/countup-js",
"version": "2.4.2",
"type": "drupal-library",
"dist": {
"url": "https://github.com/inorganik/countUp.js/archive/refs/tags/v2.4.2.zip",
"type": "zip"
}
}
},
]
[...]
2. Add the config for merge-plugin in your composer.json in the extra section:
{
"extra": {
"merge-plugin": {
"include": [
"web/modules/contrib/*/composer.libraries.json"
],
"recurse": true
}
},
}
3. If not added yet, install composer merge plugin.
composer require 'wikimedia/composer-merge-plugin:^2.0'
4. Install / Update the module by running one of the following commands:
composer require 'drupal/countup_formatter:^1.0'
composer update -W
composer update drupal/countup_formatter -W
Manual installation
Download the source code from github (Version 2.4.2 or newer) and place it in your projects libraries folder, which can typically be found in web/libraries/.
Make sure the path "libraries/countup.js/dist/countUp.umd.js" exists.
Clear the Drupal cache.
Project information
- Project categories: Site structure
96 sites report using this module
- Created by _shy on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.


