Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/crisward/riot-flipcard

a tag which can be flipped in 3d
https://github.com/crisward/riot-flipcard

Last synced: 5 days ago
JSON representation

a tag which can be flipped in 3d

Awesome Lists containing this project

README

        

A small riot tag which flips the content in 3d using css transforms.

## Install

```
npm install riot-flipcard
```

## Demo

https://crisward.github.io/riot-flipcard/

## Usage

You'll need too add `style="display:none"` to prevent the flash on content load.
You can also add `flipcard{display:none}` to the head of your document.

```html


Your Front Content


Flip


Your Back Content


Flip

````

There are three methods you can call within the flipcard tag

|Methods | Description |
|----- |------ |
|toggle | swaps front to back |
|front | switches to front |
|back | switches to back |

Front and back can be useful for hover effects ie.

```html


Your Front Content




Your Back Content


````

### Styling

You can style flipcard any way you like.

Either add a class

```html
...
```
Or add an inline style

```html
...
```

### Direction

By default flipcard flips horizontally.

But it can also flip vertically

```html
...
```
Or Diagonally
```html
...
```

## License

(The MIT License)

Copyright (c) 2015 Cris Ward

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.