1.1.0 • Published 2 years ago

usezoomimage v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

useZoomImage

Expand images to full screen with smooth animation

Example

BrowserExample

import { useZoomImage } from 'usezoomimage';

function App() {
  const [showImage, setShowImage] = React.useState(false);

  const [ref, ExpandedImage] = useZoomImage(showImage, { backdrop: true });

  return (
    <div>

      <img ref={ref} src={PlaceholderImage} alt="Placeholder Image" onClick={() => setShowImage(true)} />
      {showImage && <ExpandedImage backdropOnClick={() => setShowImage(false)} />}

    </div>
  );
};
1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago