Skip to content

Commit

Permalink
README: extend Usage chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
a-x- committed May 16, 2016
1 parent 2c0c8b5 commit b41c388
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ You are free to implement your unique diff controls.

`npm install image-diff-view`

Checkout [example](https://github.com/a-x-/image-diff-view/blob/master/example/index.html) and [demo](https://github.com/a-x-/a-x-.github.io/blob/master/image-diff-view/index.html).

```js
import ImageDiff from 'image-diff-view';

Expand All @@ -29,6 +31,14 @@ imageDiff.update(beforeUrl, afterUrl, 'fade');
imageDiff.fade(0.8);
imageDiff.tune(0.4); // abstract tune method rather than fade/swipe()
```
```html
<div class='image-diff' id='image-diff'>
<div class='image-diff__inner'>
<div class='image-diff__before'><img/></div>
<div class='image-diff__wrapper'><div class='image-diff__after'><img/></div></div>
</div>
</div>
```

## Dependencies
No dependencies required
Expand Down

0 comments on commit b41c388

Please sign in to comment.