All Projects → mikefey → React Responsive Image

mikefey / React Responsive Image

🖼️ A React responsive image component.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Responsive Image

Jekyll Cloudinary
Jekyll plugin adding a Liquid tag for Cloudinary, for better responsive images
Stars: ✭ 79 (+119.44%)
Mutual labels:  image, responsive
Imgnotes
Extension of the jQuery imgViewer plugin to add markers and notes to the image
Stars: ✭ 98 (+172.22%)
Mutual labels:  image, responsive
Imgviewer
jQuery plugin to zoom and pan images, even those with a size that is a percentage of their container
Stars: ✭ 50 (+38.89%)
Mutual labels:  image, responsive
Image Focus
A dependency free utility for cropping images based on a focus point ~2.13kB gzipped
Stars: ✭ 134 (+272.22%)
Mutual labels:  image, responsive
Vue Product Zoomer
Zoom Prodct Image, useful for e-shop website
Stars: ✭ 248 (+588.89%)
Mutual labels:  image, responsive
React Native Fit Image
Responsive image component to fit perfectly itself.
Stars: ✭ 539 (+1397.22%)
Mutual labels:  image, responsive
React Responsive Picture
A future-proof responsive image component that supports latest Picture specification
Stars: ✭ 91 (+152.78%)
Mutual labels:  image, responsive
Flex Block
一个基于Hexo的主题
Stars: ✭ 133 (+269.44%)
Mutual labels:  image, responsive
React Native Scalable Image
React Native Image component which scales width or height automatically to keep the original aspect ratio
Stars: ✭ 241 (+569.44%)
Mutual labels:  image, responsive
Guillotine
jQuery plugin to crop images within an area (fully responsive), allowing to drag (touch support), zoom and rotate.
Stars: ✭ 318 (+783.33%)
Mutual labels:  image, responsive
Glightbox
Pure Javascript lightbox with mobile support. It can handle images, videos with autoplay, inline content and iframes
Stars: ✭ 702 (+1850%)
Mutual labels:  image, responsive
React Native Super Grid
Responsive Grid View for React Native
Stars: ✭ 971 (+2597.22%)
Mutual labels:  responsive
Plyr
Plyr Mediaplayer (Video und Audio) im Front- und Backend
Stars: ✭ 30 (-16.67%)
Mutual labels:  responsive
Ruby Gem Downloads Badge
Clean and simple gem downloads count badge, courtesy of http://shields.io/. You can checkout the application directly at the following URL:
Stars: ✭ 29 (-19.44%)
Mutual labels:  image
Smartcircle
✂️Automatically determine where to crop a circular image out of a rectangular.
Stars: ✭ 29 (-19.44%)
Mutual labels:  image
Photobrowser
Elegant photo browser in Swift. 图片与视频浏览器。
Stars: ✭ 975 (+2608.33%)
Mutual labels:  image
Google Type
Collaborative typography project using select passages from Aesop's Fables set to Google Fonts
Stars: ✭ 971 (+2597.22%)
Mutual labels:  responsive
Imageretrieval
Stars: ✭ 28 (-22.22%)
Mutual labels:  image
Fabscanpi Build Raspbian
Build Script for FabScanPi Raspbian Images
Stars: ✭ 21 (-41.67%)
Mutual labels:  image
Jukeboks
Jukeboks is a fast viewer / player app
Stars: ✭ 21 (-41.67%)
Mutual labels:  image

react-responsive-image

A React responsive image component.

Displays different image sizes based on the user's window width. Can support an unlimited number of image sizes.

To install

npm i react-responsive-image

To run demo

npm install

then

npm start

Then navigate to http://localhost:3000/demo.html

To run tests

npm test

To build

npm run build

Usage

import React from 'react';
import ReactDOM from 'react-dom';
import { ResponsiveImage, ResponsiveImageSize } from 'react-responsive-image';

<ResponsiveImage>
  <ResponsiveImageSize
    default
    minWidth={0}
    path={'path-to-small-image.jpg'}
  />
  <ResponsiveImageSize
    minWidth={768}
    path={'path-to-medium-image.jpg'}
  />
  <ResponsiveImageSize
    minWidth={1100}
    path={'path-to-large-image.jpg'}
  />
</ResponsiveImage>

props for ResponsiveImage component

alt {String} // The value for the image alt attribute
background {Boolean} // If set to true, the component will render a background image
className {String} // An additional className to add to the component
lazy {Boolean} // If the component should lazy-load the image
loadImage {Boolean} // Set to `true` to load an image, if the `lazy` prop is set to `true`
onLoad {Function} // A callback to fire when the image is loaded
style {Object} // A style object to add to the component

props for ResponsiveImageSize component

default {Boolean} // If this is the default size to be loaded, before the window width is available. Mainly used for rendering from the server.
minWidth {Number} // The minimum width the window should be to load this image
path {Object} // The image path
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].