• Stars
    star
    834
  • Rank 52,507 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 4 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⏳ The online version of the classic flip clock

Flip Countdown

Flip 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.

Learn more about Flip / Learn more about Tick the engine that powers Flip


Buy me a Coffee / Dev updates on Twitter


Quick Start

If you just want to get on your way, copy the example directory and use it as a starting point.

This example will automatically initialize Flip counters on the website and can be used with the presets on the demo site.

Or you can use one of the javascript framework codesandboxes below:

Setup

For 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.

Copy the following HTML snippet in the <head> of your web page.

<link href="/flip/flip.min.css" rel="stylesheet">

Then copy the following snippet and place it just before the closing </body> tag.

<script src="/flip/flip.min.js"></script>

Make sure the paths in the above code snippets match the location of the CSS and JS files.

You can now copy past the presets to your website and everything should function correctly.

You can also load the files from a CDN like unpkg using the links below:

<link href="https://unpkg.com/@pqina/flip/dist/flip.min.css" rel="stylesheet">
<script src="https://unpkg.com/@pqina/flip/dist/flip.min.js"></script>

Install from NPM

npm i @pqina/flip --save
import Tick from '@pqina/flip';

console.log(Tick);
// logs {supported: true, options: {…}, helper: {…}, data: {…}, DOM: {…}, …}

Docs

Information on how to customize Tick and use the Tick API can be found on the product website.

Accessibility

For better compatibility with screenreaders, we need to hide the flip view using aria-hidden, this prevents the contents from being read out load. We can then use an aria-label attribute to provide a formatted label instead.

<div class="tick"
     data-value="1234"
     data-did-init="setupFlip">
  
    <!-- Hide visual content from screenreaders with `aria-hidden` -->
    <div data-repeat="true" aria-hidden="true">
        <span data-view="flip"></span>
    </div>
  
</div>

<script>
function setupFlip(tick) {

    Tick.helper.interval(function() {

        tick.value++;

        // Set `aria-label` attribute which screenreaders will read instead of HTML content
        tick.root.setAttribute('aria-label', tick.value);

    }, 1000);

}
</script>

License

MIT License, Enjoy!

More Repositories

1

filepond

🌊 A flexible and fun JavaScript file upload library
JavaScript
14,568
star
2

vue-filepond

πŸ”Œ A handy FilePond adapter component for Vue
JavaScript
1,875
star
3

react-filepond

πŸ”Œ A handy FilePond adapter component for React
JavaScript
1,757
star
4

svelte-filepond

πŸ”Œ A handy FilePond adapter component for Svelte
JavaScript
233
star
5

jquery-filepond

πŸ”Œ A handy FilePond wrapper for jQuery
JavaScript
219
star
6

ngx-filepond

πŸ”Œ A handy FilePond adapter component for Angular
TypeScript
192
star
7

tick

⏱ A counter component to render different countdown styles with
JavaScript
80
star
8

filepond-boilerplate-php

πŸ”₯ A FilePond PHP project starter kit
HTML
64
star
9

angular-filepond

πŸ”Œ A handy FilePond adapter component for Angular
TypeScript
58
star
10

filepond-server-php

A PHP server that handles FilePond uploads
PHP
48
star
11

filepond-plugin-image-preview

πŸ–Ό Show a preview for images dropped on FilePond
JavaScript
44
star
12

snaptext

Snap a picture of HTML text
JavaScript
42
star
13

filepond-plugin-file-validate-type

🚦 File Type Validation plugin for FilePond
JavaScript
33
star
14

filepond-plugin-image-edit

βœ‚οΈ Link image editor to allow editing of images dropped on FilePond
JavaScript
24
star
15

filepond-plugin-image-transform

πŸ–Ό Client-side image transformations for FilePond
JavaScript
19
star
16

filepond-plugin-file-validate-size

🚦 File Size Validation plugin for FilePond
JavaScript
17
star
17

pintura-example-javascript

HTML
14
star
18

filepond-plugin-file-encode

πŸ—œ Send FilePond Files Along with Form Submit
JavaScript
13
star
19

doka-php

PHP files to handle apply FilePond and Doka formatted image resize and crop information to files
PHP
13
star
20

filepond-polyfill

πŸ”¨ Use FilePond on Older Browsers
JavaScript
9
star
21

filepond-plugin-file-poster

πŸ–Ό Add a poster image to files
JavaScript
9
star
22

snippy

🍑 Quickly create your own custom shortcodes
PHP
9
star
23

11ty-tablissimo

JavaScript
9
star
24

filepond-plugin-image-exif-orientation

πŸ–Ό Extract EXIF orientation information from images dropped on FilePond
JavaScript
8
star
25

filepond-plugin-image-crop

πŸ–Ό Add image crop instructions to files dropped on FilePond
JavaScript
8
star
26

filepond-plugin-image-resize

πŸ–Ό Add image resize instructions to files dropped on FilePond
JavaScript
8
star
27

filepond-plugin-image-validate-size

🚦 Image Size Validation plugin for FilePond
JavaScript
8
star
28

hud

A visual way to debug 2D data
JavaScript
6
star
29

filepond-plugin-file-rename

🏷 File rename plugin for FilePond
JavaScript
6
star
30

tick-view-boom

A freely available audio plugin for Tick Counter
JavaScript
6
star
31

filepond-plugin-image-filter

πŸ–Ό Add a Color Matrix filter to images
JavaScript
5
star
32

pintura-example-react

JavaScript
5
star
33

filepond-plugin-file-metadata

🏷 File metadata plugin for FilePond
JavaScript
5
star
34

pintura-example-nextjs

JavaScript
4
star
35

pintura-example-jquery

HTML
4
star
36

pintura-example-vue-3

Vue
3
star
37

pintura-media-kit

Pintura media for third-parties
3
star
38

tablissimo

JavaScript
3
star
39

pintura-example-react-typescript

TypeScript
3
star
40

pintura-example-react-native-expo

JavaScript
2
star
41

pintura-example-cordova

JavaScript
2
star
42

pintura-example-photo-editor

HTML
2
star
43

pintura-example-react-native

Java
2
star
44

pintura-component-react-native-expo

HTML
1
star
45

filepond-plugin-image-editor

TypeScript
1
star
46

pintura-example-feature-retouch

JavaScript
1
star
47

pintura-example-vue-2

Vue
1
star
48

pintura-example-sveltekit

Svelte
1
star
49

filepond-github-assets

Assets used on FilePond GitHub repository
1
star
50

pintura-example-jquery-file-upload

HTML
1
star
51

pintura-component-react-native

HTML
1
star