0.2.2 • Published 2 years ago
react-intense v0.2.2
react-intense
This component is a port of Intense Image Viewer for use with React. Now with hooks!
Demo.
Usage
Simply replace your <img>
element with a <ReactIntense>
component:
import ReactIntense from 'react-intense'
...
<ReactIntense src='img.jpg' />
Or for more flexibility, use the provided useIntenseMaximize
hook:
import { useIntenseMaximize } from 'react-intense'
...
const { maximize, renderViewer } = useIntenseMaximize(props);
return (
<>
<button onClick={maximize}>Maximize!</button>
{renderViewer()}
</>
);
Optional Props
Name | Type | Description |
---|---|---|
title | string | Renders in corner in maximized view. |
caption | string | Renders below title in maximized view. |
vertical | boolean | Images lock to scrolling either horizontally (default) or vertically. |
moveSpeed | number | How fast to scroll images when following mouse. |
loader | React.ReactNode | The loading spinner to use. |
Styling
Feel free to use and/or customize the provided styles in dist/ReactIntense.css
.
Issues
If you find any issues with this component, please report them!
Thanks
0.2.1
2 years ago
0.2.0
2 years ago
0.2.2
2 years ago
0.1.11
3 years ago
0.1.12
3 years ago
0.1.13
3 years ago
0.1.14
3 years ago
0.1.10
3 years ago
0.1.9
4 years ago
0.1.8
4 years ago
0.1.7
5 years ago
0.1.6
6 years ago
0.1.5
6 years ago
0.1.4
6 years ago
0.1.2
7 years ago
0.1.1
8 years ago
0.1.0
8 years ago
0.0.8
8 years ago
0.0.7
8 years ago
0.0.6
9 years ago
0.0.5
9 years ago
0.0.4
9 years ago
0.0.3
9 years ago
0.0.2
9 years ago
0.0.1
9 years ago