react-puzzle
v0.3.3
Published
Sliding puzzle component for React.
Downloads
7
Readme
React Puzzle
Sliding puzzle component for React.
Installation
To install the stable version along with React, run the following:
$ npm install --save react-puzzle react
This assumes that you're using the npm package manager with a module bundler like Webpack or Browserify.
If you don't yet use npm or a modern module bundler, and would rather prefer a single-file UMD build that makes ReactPuzzle
available as a global object, you can build it yourself by running the following:
$ npm run build
You'll find the development (react-puzzle.js
) and production (react-puzzle.min.js
) versions of the library in the dist
folder. I don't recommend this approach for any serious application.
Usage
import {SlidingPuzzle} from 'react-puzzle'
import {render} from 'react-dom'
render(
<Puzzle src='http://localhost/image.png' rows={3} cols={3} />,
document.getElementById('container')
)
Meta
- Code:
git clone git://github.com/unindented/react-puzzle.git
- Home: https://github.com/unindented/react-puzzle/
Contributors
- Daniel Perez Alvarez ([email protected])
License
Copyright (c) 2016 Daniel Perez Alvarez (unindented.org). This is free software, and may be redistributed under the terms specified in the LICENSE file.