Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

CountUp Formatter

Security covered Under active development 118 sites

This module provides a field formatter that uses the countUp.js library to animate the display of numbers. It can be applied to integer, float, and decimal fields.

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.

Drupal 9–11

Ask your assistant about CountUp Formatter

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Nov 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.0.1 Stable 9–11 Mar 18, 2024
1.0.0 Stable 9–10 Nov 9, 2023
1.0.x-dev Dev 10–11 Nov 9, 2023