🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@economist/component-picture

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@economist/component-picture

Responsive picture element with support mulitple sources and dppx

latest
Source
npmnpm
Version
1.4.0
Version published
Maintainers
2
Created
Source

component-picture

This component provides a responsive picture element with support multiple sources.

Simply feed it a list of images, their widths, heights and dppx and it'll pick the best image to use given the width and height of the container element.

Goals

  • Provide one unified interface for adding images with multiple dppx (ala )
  • Provide an abstracted interface for loading multiple crops and dppx of an image (ala breakpoints)
  • Decouple the notion of "media queries" from images - making a truly responsive element (not just browser-window responsive).

Usage

See example.es6 for how to use

Install

npm install --save @economist/component-picture;

Run tests

npm test;

FAQs

Package last updated on 24 Oct 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