Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Placeholder Text Color #91

Closed
wizebin opened this issue Feb 10, 2019 · 2 comments
Closed

Feature Request: Placeholder Text Color #91

wizebin opened this issue Feb 10, 2019 · 2 comments

Comments

@wizebin
Copy link

wizebin commented Feb 10, 2019

Feature Request Description

Currently as a consumer of this library I have no way to control the placeholder color of the input field

Code

Something as simple as this would get the job done (sample from the fumi class)

       <Animated.Text
          style={[
            styles.label,
            {
              fontSize: focusedAnim.interpolate({
                inputRange: [0, 0.7, 0.71, 1],
                outputRange: [16, 16, 12, 12],
              }),
              color: focusedAnim.interpolate({
                inputRange: [0, 0.7],
                outputRange: [placeholderColor || '#696969', placeholderComposite || '#a3a3a3'],
              }),
            },
            labelStyle,
          ]}
        >

The new props could be something along the lines of the placeholderColor and placeholderComposite that I've added in this sample.

Reasoning

I would like to validate my user's input and indicate missing fields with a simple color change, currently I can add a different style like a border color, but a placeholder color would be slightly better.

screen shot 2019-02-10 at 9 32 23 pm

screen shot 2019-02-10 at 9 32 35 pm

Alternative

Having a custom placeholder component would fulfill this need

#12

@wizebin
Copy link
Author

wizebin commented Feb 10, 2019

Nope, I'm crazy, missed the labelStyle prop- that suits my needs just fine!

@wizebin wizebin closed this as completed Feb 10, 2019
@halilb
Copy link
Owner

halilb commented Feb 11, 2019

I'm glad you figured it out @wizebin :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants