Coder Social home page Coder Social logo

sanfra1407 / react-zoomer-image Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 1.13 MB

๐Ÿ” React Zoomer Image: a React component to make your images zoomable.

Home Page: https://testal.app/react-avengers/

License: MIT License

JavaScript 11.99% HTML 1.82% TypeScript 74.45% SCSS 11.73%
react react-component react-image zoom-images image images medium medium-zoom typescript

react-zoomer-image's Introduction

React Zoomer Image

React Zoomer Image is a simple React component to zoom images. It's strongly inspired by the beautiful Medium zoom effect.

Click here to try the online demo version.

Table of contents

Install

You can install React Zoomer Image with npm:

npm install react-zoomer-image

or with Yarn:

yarn add react-zoomer-image

Example

You can see React Zoomer Image on action by running with npm:

npm run example:serve

or with yarn:

yarn example:serve

Usage

You just need to import the package:

import { ZoomerImage } from "react-zoomer-image";

and use it into your React components. e.g.

import React from "react";
import { ZoomerImage } from "react-zoomer-image";

const AwesomeComponent = () => {
  return (
    <div className="awesome-component">
      <ZoomerImage
        zoomId="awesome-image"
        imgAlt="Awesome Image"
        imgTitle="This is a really awesome image!"
        imgSrc="http://awesome.image/foo.jpg"
      />
    </div>
  );
};

Then you'll just have to click on the image and enjoy the magic!

Props

Name Type Required Description
zoomId String yes Unique key to easily distinguish the image in your page. Must be unique for each image!
imgSrc String yes The source of the image you want to render.
imgAlt String no The text you want to insert into the image alt attribute. Useful to have a better SEO.
imgTitle String no The text you want to insert into the image title attribute.

Contributing

Do you like React Zoomer Image and would you like to help? Feel free to fork, open issues and ask for Pull Requests! <3

react-zoomer-image's People

Contributors

dependabot[bot] avatar sanfra1407 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-zoomer-image's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.