Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/component/flipbox

Double-sided flip box using css transformations.
https://github.com/component/flipbox

Last synced: 12 days ago
JSON representation

Double-sided flip box using css transformations.

Awesome Lists containing this project

README

        

# flipbox

Double-sided flip box using css transformations.

## Installation

$ component install component/flipbox

## Example

```html



front

back


var card = document.querySelector('#card');
var Flipbox = require('flipbox');
var box = new Flipbox(card);

box.el.onclick = function(){
box.flip();
};

```

## API

### Flipbox(el)

Initialize a `Flipbox` with the given container `el`. Inside
this should be a wrapper `div`, within that should be the two
faces. View _./example.html_ for a full example.

### Flipbox#flip()

Toggle the visibile face.

### Flipbox#front()

Show the front face.

### Flipbox#back()

Show the back face.

## License

MIT