react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

TextInput mode='outlined' background: transparent >> Incorrect output

Open syedquadri1982 opened this issue 5 years ago • 7 comments

      <TextInput theme={
        {
          colors: {
            primary: 'black', 
            placeholder: 'blue',
            background: 'transparent'
          }
        }
        } mode="outlined" label="Email" value="" /> 

image

"react-native-vector-icons": "^8.1.0" "react-native-paper": "^4.8.1" "react-native": "0.64.0"

syedquadri1982 avatar May 05 '21 06:05 syedquadri1982

Couldn't find version numbers for the following packages in the issue:

  • react-native
  • react-native-paper
  • react-native-vector-icons

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

github-actions[bot] avatar May 05 '21 06:05 github-actions[bot]

Couldn't find version numbers for the following packages in the issue:

  • react-native
  • react-native-paper
  • react-native-vector-icons

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

"react-native-vector-icons": "^8.1.0" "react-native-paper": "^4.8.1" "react-native": "0.64.0"

syedquadri1982 avatar May 05 '21 06:05 syedquadri1982

Hey @syedquadri1982, it happens when backgroundColor is transparent since it's applied to label as well which results in visible border. I can suggest you to pass the same color which you have for container (violet-ish) as a background.

lukewalczak avatar May 05 '21 08:05 lukewalczak

Hey @lukewalczak, suppose we have a linear gradient as the background, in that case we need to set backgroundColor as transparent. So, is there any other solution?

MakChan avatar May 25 '21 13:05 MakChan

Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.

github-actions[bot] avatar Jul 25 '21 00:07 github-actions[bot]

Same problem I am having, i have gradient as the background so I can't pass background colour specifically, and setting background as transparent resulting in above mentioned problem

SatyamBansal avatar Aug 10 '21 08:08 SatyamBansal

Yes , Same for me you can maintain separate labelBackgroundColor prop in react-native-paper/src/components/TextInput/Label/InputLabel.tsx.

Pass same pixel color of background container for each input field

Or simply remove label and use placeholder instead of label , I did same

vyas-git avatar Jun 13 '23 17:06 vyas-git