🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

mkp-react-native-responsive-image

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mkp-react-native-responsive-image

react native responsive image

latest
Source
npmnpm
Version
1.1.2
Version published
Maintainers
2
Created
Source

react-native-responsive-image

npm version npm license npm download npm download

React Native Responsive Image

Install

$ npm install mkp-react-native-responsive-image --save

Support

ios/android

Quick Start

<ResponsiveImage
    //you best provide a 3x image or higher.
    source={require("./images/fav.png")}
    //default design size is 375 x 667 , density is 2
    design={{
        size:{
            width:40,
            height:37
        }
    }}/>

Props

image props

...Image Props

  • defaultSource is supported on IOS/Android
  • image cache is supported

design

//define
design: PropTypes.shape({
    density: PropTypes.number,
    screen: PropTypes.shape({
        width: PropTypes.number,
        height: PropTypes.number
    }),
    size: PropTypes.shape({
        width: PropTypes.number.isRequired,
        height: PropTypes.number.isRequired
    }).isRequired
})
//default
design: {
    density: 2,
    screen: {
        width: 375,
        height: 667
    }
}

Keywords

react-native

FAQs

Package last updated on 25 Nov 2016

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