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

react-native-universal-image

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-universal-image

A responsive image component with progressive loading for react native

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

UniversalImage

An auto sizing image component with progressive loading for react native.

Universal Image

Image component that resizes itself to contain the image. Progressively loads image with blur effect and spinner overlay.

Note: For auto resize, please make sure your thumbnails are the same aspect ratio as the original image.

Installation

Since the library is a JS-based solution, to install the latest version of react-native-universal-image you only need to run:

yarn add react-native-universal-image

or

npm install --save react-native-universal-image

Use Cases

  • Rendering remote images with variable dimensions.
  • Building a feeds / timeline screen ?
  • Leverage progressive loading for a performant UI.
  • Looking for an instagram like animation for your images ?
  • Default resize modes (cover / contain) don't provide what you are looking for?

Usage

import UniversalImage from 'react-native-universal-image';

<UniversalImage
    indicator
    indicatorColor="#1AD2EF"
    indicatorSize="large"
    defaultHeight={350}
    imageFadeDuration={3000}
    thumbnailFadeDuration={1000}
    thumbnailBlurRadius={1}
    imageSource={{ uri: IMAGE_URL }}
    thumbnailSource={{ uri: THUMBNAIL_URL }} />

Properties

PropDescriptionDefaultRequired
indicatorSpinner overlay on imagefalse
indicatorColorColor of spinner componentNone
indicatorSizeSize of spinner component ('small', 'large')None
defaultHeightDefault height of the component while the thumbnail is being loaded350
thumbnailSourceProvide a low resolution version of the image used in imageSource.NoneRequired
imageSourceOriginal image uriNoneRequired
thumbnailBlurRadiusBlur radius for the low resolution thumbnail.None
imageFadeDurationFade-in duration for the image in ms.None
thumbnailFadeDurationFade-in duration for the thumbnail in ms.None
onLoadThumbnailCallback function that gets called when the thumbnail is loaded.noop
onLoadImageCallback function that gets called when the main image is loaded.noop

Contributing

Interested in contributing to this repo? Feel free to raise a pull request or report an issue at react-native-universal-image.

Keywords

react

FAQs

Package last updated on 12 Jul 2018

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