Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.0%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: drcodemonster
  • License: mit
  • Language: JavaScript
  • Default Branch: master
  • Size: 401 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 2 years ago · Last pushed over 2 years ago
Metadata Files
Readme Changelog Contributing Funding License Citation

README.md

rn-image-auto-height

this is a fork of vivaxy.. I just upgraded the package dependencies. Orginal npm package name was also changed from react-native-auto-height-image to rn-image-auto-height.

Initialized by vivaxy/gt-npm-package

NPM Version NPM Downloads MIT License Conventional Commits Financial Contributors on Open Collective Maintainers Wanted DOI

This component provides you a simple way to load a remote image and automatically set Image height to the image dimension which fits the provided width.

React Native Image component needs users to set both width and height props.

React Native version requirements: >=0.72.6.

Installation

yarn add rn-image-auto-height

npm install rn-image-auto-height

Usage

Use local or remote files:

```js import React, { Component } from 'react'; import AutoHeightImage from 'rn-image-auto-height';

import image from 'gallifrey-falls.png';

export default class Demo extends Component { render() { return (

    <AutoHeightImage
      width={100}
      source={image}
    />

    <AutoHeightImage
      width={100}
      source={{uri: 'http://placehold.it/350x150'}}
    />

  </View>
);

} } ```

You can even specify fallback images for when the source fails to load:

```js import React, { Component } from 'react'; import AutoHeightImage from 'rn-image-auto-height';

import image from 'gallifrey-falls.png';

export default class Demo extends Component { render() { return ( ); } } ```

Props

| name | type | isRequired | default | description | | --- | --- | --- | --- | --- | | width | number | ✔ | N/A | image width to fit | | maxHeight | number | ✖ | Infinity | image max height | | source | number or object | ✔ | N/A | local (i.e. require/import) or remote image ({uri: '...'}) | | fallbackSource | number or object | ✖ | N/A | local (i.e. require/import) or remote image ({uri: '...'}) | | onHeightChange | func | ✖ | (height) => {} | called when updating image height, the argument height might be 0 | | animated | bool | ✖ | false | Use Animated.Image instead of Image |

Other image props except resizeMode are accepted.

Change Log

Change log

Contributing

Contributing

Licence

MIT

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

Related Projects

Owner

  • Name: DrCodeMonster
  • Login: drcodemonster
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.1.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Xu
    given-names: Ye
    orcid: https://doi.org/10.5281/zenodo.7813210
title: vivaxy/rn-image-auto-height
version: v3.2.4
date-released: 2023-04-10

GitHub Events

Total
Last Year

Packages

  • Total packages: 1
  • Total downloads:
    • npm 13 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
npmjs.org: rn-image-auto-height

react-native auto height image

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 13 Last month
Rankings
Forks count: 15.4%
Downloads: 16.0%
Stargazers count: 20.9%
Average: 28.1%
Dependent repos count: 36.2%
Dependent packages count: 51.8%
Maintainers (1)
Last synced: 8 months ago

Dependencies

ExampleApp/package.json npm
  • babel-preset-expo ^8.0.0 development
  • expo ~49.0.0
  • react 18.2.0
  • react-dom 18.2.0
  • react-native 0.72.6
  • react-native-web ~0.19.9
  • rn-image-auto-height file:..
ExampleApp/yarn.lock npm
  • 1057 dependencies
package-lock.json npm
  • 835 dependencies
package.json npm
  • @commitlint/cli ^12.0.0 development
  • @commitlint/config-conventional ^12.0.0 development
  • husky 6 development
  • lint-staged ^11.0.0 development
  • pinst ^2.1.4 development
  • prettier ^2.0.0 development
  • react ^18.2.0 development
  • react-native ^0.72.6 development
  • standard-version ^9.0.0 development
  • prop-types ^15.7.2
yarn.lock npm
  • 835 dependencies