stripe / stripe-js

Loading wrapper for Stripe.js
https://stripe.com/docs/js
MIT License
637 stars 157 forks source link

[REQUEST]: Custom placeholder option for inputs in Address Element. #629

Open tnmquan9799 opened 5 months ago

tnmquan9799 commented 5 months ago

What happened?

Hey I'm implementing an Address Element from Stripe. I decided to hide all the labels to match my desgin consistency. But only then I found out that the City and ZIP inputs don't have a placeholder.

Is there a plan for supporting this or any workaround? If I can I would just show the labels but not in this case. Thank you!

Environment

No response

Reproduction

No response

stale[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

brendanm-stripe commented 3 months ago

Hey there, while we are not currently planning to offer custom placeholders I have shared the report of missing placeholders on City & Zip so that we can get those added.

brendanm-stripe commented 3 months ago

We're looking into this, but as an interim option you can try floating labels to see if that works for you. I understand this might not be as aligned with your existing styles, though.

const appearance = {
  labels: 'floating',
}
stale[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.