This document covers Image
component and Image size style names available in Shoutem UI toolkit.
Image
has no specific (custom) Props, however, it supports every prop that the standard React Native Image
component supports. For full list of available props, visit
React Native Image component documentation.
For most of available Image
style names, Image dimensions are scaled depending on screen dimensions. As example, Image
with featured
style name applied will have dimensions of 365x345px (width, height respectively)
on device with screen width of 375px
. If device’s screen width is larger, then the image dimensions will be larger than 365x345px and similar, if device screen width is smaller than 375px, actual image will be smaller than 365x345px.
(365 / 375) * window.width
height: (345 / 375) * window.width
window.width
height: (280 / 375) * window.width
window.width
height: (280 / 375) * window.width
window.width
height: (200 / 375) * window.width
window.width
height: window.width
window.width
height: (238 / 375) * window.width
window.width
height: (130 / 375) * window.width
145px
x height: 92px
(180/375) * window.width
height: 85px
145px
height: 145px
(209/375)
height: 139px
65px
height: 65px
Style
prop that the standard React Native Image
component supports<Image
styleName="small"
source={{ uri: 'https://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
/>
<Image
styleName="medium"
source={{ uri: 'https://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
/>
<Image
styleName="medium-wide"
source={{ uri: 'https://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
/>
<Image
styleName="small-avatar"
source={{ uri: 'https://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
/>
<Image
styleName="medium-avatar"
source={{ uri: 'https://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
/>
<Image
styleName="medium-square"
source={{ uri: 'https://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
/>
<Image
styleName="large-banner"
source={{ uri: 'https://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
/>
<Image
styleName="featured"
source={{ uri: 'https://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
/>
<Image
styleName="large-portrait"
source={{ uri: 'https://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
/>
<Image
styleName="large"
source={{ uri: 'https://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
/>
<Image
styleName="large-wide"
source={{ uri: 'https://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
/>
<Image
styleName="large-square"
source={{ uri: 'https://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
/>