Skip to main content

ImageModal

ImageModal component of React Native for building a user interface.

How to use

import React from 'react';
import {ImageModal} from '@gyri/native-ui-components';

const App = ({className}) => {
return (
<ImageModal
className={className}
resizeMode="contain"
style={{
width: 250,
height: 250,
}}
source={{
uri: 'https://cdn.pixabay.com/photo/2019/07/25/18/58/church-4363258_960_720.jpg',
thumbUri: 'https://cdn.pixabay.com/photo/2019/07/25/18/58/church-4363258_960_720.jpg',
}}
/>
)
}
export default App

Props

#NameData typeDefault valueValuesDescription
1styleobjectCustom style object
2classNamestring''It defined nativewind style classes.
3sourceobject{}{uri: image path, thumbUri: compressed thumb url}Image source uri and thumb uri. Thumb uri image should be of smaller size; so it will give better performance.
4resizeModestring'cover'contain, cover, stretch, repeat, center.

For more details https://github.com/jobtoday/react-native-image-viewing#readme