I'm not sure how to create this, but I believe using ImageBackground
could be the solution. I utilized it as a placeholder for an image in place of an actual image
.
import * as React from 'react';
import { Text, View, StyleSheet,TextInput,ImageBackground } from 'react-native';
import Constants from 'expo-constants';
export default class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.paragraph}>
Utilize ImageBackground
</Text>
<ImageBackground style={{height: 40 , width:"100%"}} source={require("./test.png")}>
<TextInput style={{height: 40,color:"red",paddingHorizontal:120}} />
</ImageBackground>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
paddingTop: Constants.statusBarHeight,
backgroundColor: '#ecf0f1',
padding: 8,
},
paragraph: {
margin: 24,
fontSize: 18,
fontWeight: 'bold',
textAlign: 'center',
},
});
https://i.sstatic.net/r0Aie.gif