You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

react-intense

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-intense

A React port of the javascript full-size image viewer

0.2.2
latest
Source
npm
Version published
Weekly downloads
3
-94.23%
Maintainers
1
Weekly downloads
 
Created
Source

react-intense

npm version Build and Deploy

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

NameTypeDescription
titlestringRenders in corner in maximized view.
captionstringRenders below title in maximized view.
verticalbooleanImages lock to scrolling either horizontally (default) or vertically.
moveSpeednumberHow fast to scroll images when following mouse.
loaderReact.ReactNodeThe 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

Keywords

react

FAQs

Package last updated on 27 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts