elements
elements copied to clipboard
Properly support phone numbers
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [ ] I have joined the Ory Community Slack.
- [ ] I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
No response
Describe your problem
ory/elements-react should support phone numbers properly.
Describe your ideal solution
Whenever we show a phone number in the UI, it should be properly formatted (using https://www.npmjs.com/package/libphonenumber-js).
Inputs should use a proper phonenumber input, for example https://www.npmjs.com/package/react-phone-number-input.
Workarounds or alternatives
Version
master
Additional Context
Ideally, we set this up as an optional dependency, as these libraries are quite heavy, and since it depends on the API payload, if they are required, they can't be statically tree shaken.
Either through optional npm deps or some kind of plugin system.
This would be hugely beneficial to us to.