0.4.1 • Published 1 year ago

@computeruniverse/react-magnifier v0.4.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

@computeruniverse/react-magnifier

Last commit license PRs Welcome
Downloads Activity Minified npm

Description

A simple and lightweight side-by-side Magnifier

Demo

https://computeruniverse-oss.github.io/react-magnifier

Usage

Install the package

Yarn

yarn add @computeruniverse/react-magnifier

NPM

npm install @computeruniverse/react-magnifier

Add the component to your React application:

import Magnifier from "@computeruniverse/react-magnifier";

<Magnifier
    zoomImg={'https://picsum.photos/id/190/1000/1000'}
    zoomImgHeight={1000}
    zoomImgWidth={1000}
    offsetLeft={10}
    >
    <img src={'https://picsum.photos/id/190/400/400'} height={400} width={400} alt="Lorem picsum " />
</Magnifier>

Props

NameTypeDefaultDescription
zoomImgstring(required)Path to the "Big"-Image that is used for the zoom
zoomImgWidthnumber(required)"Big"-Image width
zoomImgHeightnumber(required)"Big"-Image height
offsetTopnumber0top offset for the Zoom Portal
offsetLeftnumber0left offset for the Zoom Portal

Development

Requirements: Node.js, Yarn 1. Clone this repository: git clone https://github.com/computeruniverse-oss/react-magnifier.git 2. Install all dependencies: yarn install 3. Start storybook yarn storybook so that you have a place where you can test your stuff.

Contributing

Suggestions and contributions are always welcome! Please first discuss changes via issue before submitting a pull request.

0.4.1

1 year ago

0.4.0

1 year ago

0.3.0

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago