Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-fit-image

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-fit-image

Responsive image component to fit perfectly itself.

  • 1.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
156K
increased by9.09%
Maintainers
1
Weekly downloads
 
Created
Source

React Native Fit Image npm version

React Native Fit Image enables you to draw responsive image component.

Introduction

Responsive image component to fit perfectly itself.

Install

npm install react-native-fit-image --save

Usage

// custom styles for FitImage
var styles = StyleSheet.create({
  fitImage: {
    borderRadius: 20,
  },
});

// draws image to fit inherited space automatically, even when screen is rotated.
// even you don't need to provide original size in v1.2.0
<FitImage
  source={{ uri: 'http://facebook.github.io/react/img/logo_og.png' }}
  style={styles.fitImage}
/>

// draws image to fit inherited space automatically, even when screen is rotated.
<FitImage
  source={{ uri: 'http://facebook.github.io/react/img/logo_og.png' }}
  originalWidth={400}
  originalHeight={400}
  style={styles.fitImage}
/>

// or draws image to specific size like Image component.
<FitImage
  source={{ uri: 'http://facebook.github.io/react/img/logo_og.png' }}
  width={200}
  height={200}
  style={styles.fitImage}
/>

Example

FitImageExample - Portrait FitImageExample - LandScape

Keywords

FAQs

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc