{"id":13808483,"url":"https://github.com/pqina/flip","last_synced_at":"2025-06-19T03:49:00.437Z","repository":{"id":41400348,"uuid":"245359522","full_name":"pqina/flip","owner":"pqina","description":"⏳ The online version of the classic flip clock","archived":false,"fork":false,"pushed_at":"2023-11-17T15:53:37.000Z","size":848,"stargazers_count":838,"open_issues_count":20,"forks_count":85,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-04-14T05:58:53.972Z","etag":null,"topics":["countdown","counter","flip","flip-animation","flipclock"],"latest_commit_sha":null,"homepage":"https://pqina.nl/flip/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pqina.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"custom":["https://www.buymeacoffee.com/rikschennink"]}},"created_at":"2020-03-06T07:48:41.000Z","updated_at":"2024-04-07T10:43:00.000Z","dependencies_parsed_at":"2022-08-10T02:07:21.796Z","dependency_job_id":"30b52c43-5d63-40ff-ae73-b255d906bd39","html_url":"https://github.com/pqina/flip","commit_stats":{"total_commits":30,"total_committers":4,"mean_commits":7.5,"dds":0.2666666666666667,"last_synced_commit":"6b22f70720b60a619391bf4e9f2efb0ef91045b7"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pqina%2Fflip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pqina%2Fflip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pqina%2Fflip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pqina%2Fflip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pqina","download_url":"https://codeload.github.com/pqina/flip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225273240,"owners_count":17448073,"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":["countdown","counter","flip","flip-animation","flipclock"],"created_at":"2024-08-04T01:01:43.978Z","updated_at":"2024-11-19T00:30:47.730Z","avatar_url":"https://github.com/pqina.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/rikschennink","https://www.buymeacoffee.com/rikschennink/"],"categories":["JavaScript"],"sub_categories":[],"readme":"# Flip Countdown\n\nFlip is an advanced and beautiful flip counter plugin. Easy to use and highly flexible, you can set up a custom counter on your website in minutes. Display visitor counts, countdown to a special date or celebrate progress. Whatever you’re planning, the options are endless.\n\n![](./flip.gif)\n\n[Learn more about Flip](https://pqina.nl/flip/) / [Learn more about Tick the engine that powers Flip](https://github.com/pqina/tick/)\n\n---\n\n[\u003cimg src=\"https://github.com/pqina/flip/blob/master/header.svg\" alt=\"\"/\u003e](https://www.buymeacoffee.com/rikschennink/)\n\n[Buy me a Coffee](https://www.buymeacoffee.com/rikschennink/) / [Dev updates on Twitter](https://twitter.com/rikschennink/)\n\n---\n\n\n## Quick Start\n\nIf you just want to get on your way, copy the `example` directory and use it as a starting point.\n\nThis example will automatically initialize Flip counters on the website and can be used with the [presets on the demo site](https://pqina.nl/flip/#presets).\n\nOr you can use one of the javascript framework codesandboxes below:\n- [React](https://codesandbox.io/s/react-flip-demo-txoux)\n- [Vue](https://codesandbox.io/s/vue-flip-demo-xhtfk)\n\n## Setup\n\nFor the code snippets below we'll assume it's the `flip.min.css` and `flip.min.js` version and the folder we are uploading to is named `flip`.\n\nCopy the following HTML snippet in the `\u003chead\u003e` of your web page.\n\n```html\n\u003clink href=\"/flip/flip.min.css\" rel=\"stylesheet\"\u003e\n```\n\nThen copy the following snippet and place it just before the closing `\u003c/body\u003e` tag.\n\n```html\n\u003cscript src=\"/flip/flip.min.js\"\u003e\u003c/script\u003e\n```\n\nMake sure the paths in the above code snippets match the location of the CSS and JS files.\n\nYou can now copy past the [presets](https://pqina.nl/flip/#presets) to your website and everything should function correctly.\n\nYou can also load the files from a CDN like unpkg using the links below:\n\n```html\n\u003clink href=\"https://unpkg.com/@pqina/flip/dist/flip.min.css\" rel=\"stylesheet\"\u003e\n```\n\n```html\n\u003cscript src=\"https://unpkg.com/@pqina/flip/dist/flip.min.js\"\u003e\u003c/script\u003e\n```\n\n\n### Install from NPM\n\n```\nnpm i @pqina/flip --save\n```\n\n```js\nimport Tick from '@pqina/flip';\n\nconsole.log(Tick);\n// logs {supported: true, options: {…}, helper: {…}, data: {…}, DOM: {…}, …}\n```\n\nModule usage example project on Stackblitz: https://stackblitz.com/edit/flip-counter-module\n\n## Docs\n\nInformation on how to customize Tick and use the Tick API can be found on the [product website](https://pqina.nl/tick/).\n\n\n## Accessibility\n\nFor better compatibility with screenreaders, we need to hide the flip view using `aria-hidden`, this prevents the contents from being read out loud. We can then use an `aria-label` attribute to provide a formatted label instead.\n\n```html\n\u003cdiv class=\"tick\"\n     data-value=\"1234\"\n     data-did-init=\"setupFlip\"\u003e\n  \n    \u003c!-- Hide visual content from screenreaders with `aria-hidden` --\u003e\n    \u003cdiv data-repeat=\"true\" aria-hidden=\"true\"\u003e\n        \u003cspan data-view=\"flip\"\u003e\u003c/span\u003e\n    \u003c/div\u003e\n  \n\u003c/div\u003e\n\n\u003cscript\u003e\nfunction setupFlip(tick) {\n\n    Tick.helper.interval(function() {\n\n        tick.value++;\n\n        // Set `aria-label` attribute which screenreaders will read instead of HTML content\n        tick.root.setAttribute('aria-label', tick.value);\n\n    }, 1000);\n\n}\n\u003c/script\u003e\n```\n\n## License\n\nMIT License, Enjoy!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpqina%2Fflip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpqina%2Fflip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpqina%2Fflip/lists"}