Stay informed
Subscribe to our newsletter if you'd like to stay informed about Shoutem Extensions and Shoutem UI Toolkit.
Overlay
provides a convenient way to place content over Image
, through semi-transparent background.
Overlay
has no specific (custom) Props, however, it supports every prop that the standard React Native View
component supports. For full list of available props, visit
React Native View component documentation.
Style
prop that the standard React Native View
component supports
<Screen>
<NavigationBar
styleName="inline"
title="Restaurants"
/>
<ImageBackground
styleName="large-banner"
source=
>
<Tile>
<Overlay styleName="image-overlay">
<Title styleName="sm-gutter-horizontal">SUSHI ACADEMY</Title>
<Subtitle>1900 Warner Ave. Unit A Santa Ana, CA</Subtitle>
</Overlay>
</Tile>
</ImageBackground>
</Screen>
<Screen>
<NavigationBar
styleName="inline"
title="Restaurants"
/>
<ImageBackground
styleName="large-banner"
source=
>
<Tile>
<Overlay styleName="fill-parent image-overlay">
<Subtitle styleName="sm-gutter-horizontal">GASPAR BRASSERIE</Subtitle>
</Overlay>
</Tile>
</ImageBackground>
</Screen>
constructor(props) {
super(props);
this.state = {
photos:
[
{ "source": { "uri": "https://shoutem.github.io/static/getting-started/restaurant-1.jpg" } },
{ "source": { "uri": "https://shoutem.github.io/static/getting-started/restaurant-2.jpg" } },
{ "source": { "uri": "https://shoutem.github.io/static/getting-started/restaurant-3.jpg" } }
]
}
}
render() {
return (
<Screen>
<ImageBackground
source=
style=
>
<NavigationBar
styleName="inline clear"
title="EXPLORE"
rightComponent={
<Button>
<Overlay styleName="rounded-small image-overlay">
<Subtitle styleName="top">Map</Subtitle>
</Overlay>
</Button>
}
/>
</ImageBackground>
<View
styleName="lg-gutter-top"
>
<Tile>
<Image
styleName="large-wide"
source=
/>
<View styleName="content">
<Title>MAUI BY AIR THE BEST WAY AROUND THE ISLAND</Title>
<View styleName="horizontal space-between">
<Caption>1 hour ago</Caption>
<Caption>15:34</Caption>
</View>
</View>
</Tile>
</View>
</Screen>
);
}