Image #

A react component for displaying different types of images.

Example usage:

renderImages: function() { return ( <View> <Image style={styles.icon} source={require('./myIcon.png')} /> <Image style={styles.logo} source={{uri: ''}} /> </View> ); },

Props #

crop?: [number] #

Specifies the extents of the UV to display

onLoad?: PropTypes.func #

Invoked when load completes successfully

onLoadEnd?: PropTypes.func #

Invoked when load either succeeds or fails

onLoadStart?: PropTypes.func #

Invoked on load start

source?: PropTypes.oneOfType([ PropTypes.shape({ uri: PropTypes.string, }), // Opaque type returned by require('./image.jpg') PropTypes.number, ]) #

uri is a string representing the resource identifier for the image, which could be an http address, a local file path, or a static image resource (which should be wrapped in the require('./path/to/image.png') function).

style?: style #

backgroundColor color
borderBottomLeftRadius number
borderBottomRightRadius number
borderColor color
borderRadius number
borderTopLeftRadius number
borderTopRightRadius number
borderWidth number
opacity number
overflow enum('visible', 'hidden')
resizeMode Object.keys(ImageResizeMode)
tintColor color

Changes the color of all the non-transparent pixels to the tintColor.

testID?: PropTypes.string #

Used to locate this view in end-to-end tests.

You can file an issue on GitHub if you see a typo or error on this page!