deck-of-cards 0,0,1,0,1,1,0,0 npm

HTML5 Deck of Cards

2 years after LGPL-3.0

HTML5 Deck of Cards


Pure vanilla JS (+ CSS3) – no dependencies, by Juha Lindstedt & contributors.

Install from Google Chrome Web Store

Frontside card graphics are slightly modified from Chris Aguilar's awesome Vector Playing Card Graphics Set.

Also check out my RE:DOM and HTML5 Node Garden projects!


LGPL if you use Chris Aguilar's vector playing cards. Otherwise MIT.


Installation from npm

npm install deck-of-cards

Build instructions

npm install
npm start

(starts watching for changes..)

Latest changes

  • 0.1.4 card.animateTo() -method added –> simplier modules! Simple example of usage
  • 0.1.3 JS animations (instead of CSS transitions)
  • 0.1.2 Backside graphics + setRankSuit (+ card.value -> card.rank!)
  • 0.1.1 Better organized modules + Chrome app
  • 0.1.0 Realistic face graphics, notice change of license for now..
  • 0.0.4 winning mode, simpler shuffling, CSS box-shadow change
  • 0.0.3 big refactoring – code now easier to follow and in smaller pieces
  • 0.0.2 made intro shorter & added "poker"
  • 0.0.1 initial version

Where's what?

css/ - CSS source (stylus + nib) of the example

chrome/ - Chrome Web Store app source

dist/ - deck.js & deck.min.js

example/ -

lib/ - JS (ES6) source of dist/deck.js - deck.js is also the main file

views/ - HTML source of the example

Note to self: todo

  • Make z-index temporary by reordering DOM elements between actions
  • Enhance API, make more flexible

Featured on

Related Repositories



An API to simulate a deck of cards ...



Baraja is a jQuery plugin that allows to move elements in a card-like fashion an ...



This mighty little deck of cards will change your health habits. ...



Memorize a shuffled deck of playing cards ...



How to model of Deck of Cards in Haskell ...

Top Contributors

pakastin jansegre joequery vinceau mizzao ceautery hubdotcom mjkaufer


package version
dev babel ^5.8.23
chokidar ^1.0.5
jade ^1.11.0
nib ^1.1.0
rollup ^0.16.4
stylus ^0.52.0
uglify-js ^2.4.24


-   0.1.4 zip tar
-   0.1.3 zip tar
-   0.1.2 zip tar
-   0.1.1 zip tar
-   0.1.0 zip tar
-   0.0.4 zip tar
-   0.0.3 zip tar
-   0.0.2 zip tar