'react native text input with required asterisk symbol similar to material ui

Please share samples in react native text input with required asterisk symbol similar to material ui enter image description here



Solution 1:[1]

Use react-native-paper

<TextInput
  label='Password '
  mode='outlined' 
  value={this.state.text} 
  onChangeText={password => this.setState({ password })}
  underlineColor='transparent' 
  theme={...}
>

More detail Here

Solution 2:[2]

I have used "react-native-paper": "4.9.2" below code works fine in this version.

<TextInput
  mode="flat"
  label={
  <Text>
       Label
       <Text style={{color: 'red'}}> *</Text>
  </Text>
  }
  placeholder="Type something"
/>   

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nooruddin Lakhani
Solution 2 MD. IBRAHIM KHALIL TANIM