0.2.5 • Published 7 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 --saveor
yarn add react-fancyboxUsage
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 btn0.2.5
7 years ago
0.2.4
7 years ago
0.2.3
8 years ago
0.2.2
8 years ago
0.2.1
8 years ago
0.2.0
8 years ago
0.1.4
8 years ago
0.1.3
9 years ago
0.1.2
9 years ago
0.1.1
9 years ago
0.1.0
9 years ago
0.0.15
9 years ago
0.0.14
9 years ago
0.0.13
9 years ago
0.0.12
9 years ago
0.0.11
9 years ago
0.0.10
9 years ago
1.0.2
9 years ago
1.0.1
9 years ago
1.0.0
9 years ago
0.0.0
11 years ago