{"id":15066604,"url":"https://github.com/azi3/flip-counter","last_synced_at":"2025-04-10T13:43:12.731Z","repository":{"id":57238450,"uuid":"122012518","full_name":"AZI3/flip-counter","owner":"AZI3","description":"This project creates a configurable flip counter using CSS3 animations.","archived":false,"fork":false,"pushed_at":"2018-05-14T13:05:58.000Z","size":158,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T11:36:43.157Z","etag":null,"topics":["css","es6","frontend-web","sass","webpack"],"latest_commit_sha":null,"homepage":"https://brianjzhang.github.io/flip-counter/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AZI3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-19T02:55:35.000Z","updated_at":"2021-05-03T08:29:47.000Z","dependencies_parsed_at":"2022-08-26T14:13:05.192Z","dependency_job_id":null,"html_url":"https://github.com/AZI3/flip-counter","commit_stats":null,"previous_names":["brianjzhang/flip-counter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AZI3%2Fflip-counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AZI3%2Fflip-counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AZI3%2Fflip-counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AZI3%2Fflip-counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AZI3","download_url":"https://codeload.github.com/AZI3/flip-counter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248226310,"owners_count":21068179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","es6","frontend-web","sass","webpack"],"created_at":"2024-09-25T01:09:48.193Z","updated_at":"2025-04-10T13:43:12.707Z","avatar_url":"https://github.com/AZI3.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flip-counter [![NPM version](https://img.shields.io/npm/v/flip-counter-js.svg)](https://www.npmjs.com/package/flip-counter-js)\n\n\u003e This is a Flip Counter component with CSS3 animation style. It can be extended to use as a timer, countdown or else that can be represented with digits. \n[demo](https://brianjzhang.github.io/flip-counter/dist/index.html)\n\n## Installation\n\n``` bash\n npm install flip-counter-js --save\n```\n\n## Usage\n1. Create an element, e.g. `\u003cdiv\u003e` in your HTML template and set `data-flip-counter-js` attribute on this element. Refer to the options and configure it as required.\n    ``` html\n    \u003cdiv data-flip-counter-js data-fc-size=\"lg\" data-fc-step=\"11\" data-fc-speed=\"500\"\n             data-fc-minDigits=\"10\"\n             data-fc-start=\"10\"\u003e\u003c/div\u003e\n    ```\n2. Import `FlipCounterJs` module. The JavaScript file is generated by Webpack and it supports both CommonJs and AMD.\n    ``` javascript\n    import FlipCounter from 'flip-counter-js';\n    ```\n    Else you can find it on global `window` object.\n    ``` javascript\n    \u003cscript src=\"node_modules/flip-counter-js/dist/flip-counter-js.js\"\u003e\u003c/script\u003e\n    ```    \n3. Finally don't forget to include the css style.\n    ``` html\n    \u003clink rel=\"stylesheet\" type=\"text/css\" href=\"./node_modules/flip-counter-js/dist/css/style.min.css\"/\u003e\n    ```  \n4. There is another way to create an instance using JavaScript API:\n    ``` javascript\n        var fc = new FlipCounterJs(document.getElementById('fcElement',{\n            speed: 0\n        });\n        \n        fc.increment(10); // Add 10\n    ```\n## Options\n\nProperty|Type|Default|Description\n---|---|---|---\nstep|Number|1|The amount by which the value increases every time. \nspeed|Number|0|The rate at which the value increases. Unit is _milliseconds_. Minimum value is _500_. If the value is 0, the counter won't increment/decrement automatically.\nminDigits|Number|4|The minimum number of digits to show. You may expect leading zeros.\nstart|Number|0|The initial value.\nsize|String|'sm'|Possible values: `xs`, `sm`, `md`, `lg`.\nmode|String|'up'|Possible values: `up` or `down`. Set mode as `up` to count up, or `down` to count down. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazi3%2Fflip-counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazi3%2Fflip-counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazi3%2Fflip-counter/lists"}