@app-elements/image

2.0.0 • Public • Published

Image

Renders an <img /> with an array of src's, rendering each, in order, as the complete. The idea is the first is the smallest filesize and the last is the highest resolution.

Installation

npm install --save @app-elements/image

Usage

import Image from '@app-elements/image'

<Image
  srcs={[
    'http://www.placehold.it/200x150/eee/eee?text=Loading',
    'http://www.placehold.it/400x300/f44/fff?text=MediumRes',
    'http://www.placehold.it/800x600/44f/fff?text=HighRes'
  ]}
/>

Props

Prop Type Default Description
srcs Array None An array of image URLs.

Package Sidebar

Install

npm i @app-elements/image

Weekly Downloads

13

Version

2.0.0

License

ISC

Unpacked Size

35.3 kB

Total Files

12

Last publish

Collaborators

  • adriaanwm
  • coryschadt
  • staydecent
  • trustfall