New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-image-selector

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-image-selector

A responsive image selector for React

latest
Source
npmnpm
Version
1.1.2
Version published
Maintainers
1
Created
Source

react-image-selector

This is a React component that wraps the imageSelector. It takes a set of cuts of images and fills in the src attribute of an image based on the size of the image.

Basic Usage

The Image component creates an <img>. The Cuts component never render, they hold data about the different cuts of the image.

import { Image, Cut } from 'react-image-selector';

export default MyImage extends React.Component {
	render () {
		return (<Image responsive={true}>
			<Cut
				width={200}
				height={400}
				src="/path/to/image.jpg"
				at2x="/path/to/retina/image.jpg"
			/>
			<Cut
				width={400}
				height={800}
				src="/path/to/image.jpg"
				at2x="/path/to/retina/image.jpg"
			/>
		</Image>)
	}
}

Keywords

responsive

FAQs

Package last updated on 03 Aug 2017

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