0.2.5 • Published 5 years ago
react-fancybox v0.2.5
React Fancybox
Installation
The easiest way to use react-fancybox is to install it from NPM and include it in your own React build process (using Browserify, Webpack, etc).
You can also use the standalone build by including dist/react-fancybox.js
in your page. If you use this, make sure you have already included React, and it is available as a global variable.
npm install react-fancybox --save
or
yarn add react-fancybox
Usage
import React, {Component} from 'react';
import ReactFancyBox from 'react-fancybox'
import 'react-fancybox/lib/fancybox.css'
class App extends Component {
render() {
return (
<div className="App">
<ReactFancyBox
thumbnail="https://loremflickr.com/320/240"
image="https://www.w3schools.com/howto/img_forest.jpg"/>
</div>
);
}
}
export default App;
**Other props**
caption: a caption of image
animation: default "fade"
defaultThumbnailWidth: if you dont define thumbnail, this will use image to thumnail
defaultThumbnailHeight: default heigh of thumbnail of you dont define
onOpen: function call after show box
onClose: function call after close box
showCloseBtn: show close btn
0.2.5
5 years ago
0.2.4
5 years ago
0.2.3
6 years ago
0.2.2
6 years ago
0.2.1
6 years ago
0.2.0
6 years ago
0.1.4
6 years ago
0.1.3
7 years ago
0.1.2
7 years ago
0.1.1
7 years ago
0.1.0
7 years ago
0.0.15
7 years ago
0.0.14
7 years ago
0.0.13
7 years ago
0.0.12
7 years ago
0.0.11
7 years ago
0.0.10
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago
0.0.0
9 years ago