ui
ui copied to clipboard
[Input Password]: eye icon doesn't show
When you load first time a value of a input type password, the eye icon doesn't show. Following below its a selected input:
The "eye icon" is not included in the default HTML input tag, and it has not been implemented in this library either. You can submit a feature request if you would like this to be implemented.
+1 to This. Maybe as a variant, instead of default
The "eye icon" is not included in the default HTML input tag, and it has not been implemented in this library either. You can submit a feature request if you would like this to be implemented.
can I try to work on this?
@multiwebinc @shadcn @puneet-sarhali have a look at this, what should be the next step here Should I implement in all the components?
@tuminzee If it's not too much code, I would try to integrate that into https://github.com/shadcn/ui/blob/main/apps/www/components/ui/input.tsx and submit a PR. You could add the optional parameter showPasswordToggle and if the type is text, the password would be revealed by default, and if it's password, it would be hidden by default. Clicking on the icon would toggle the type between text and password.
@multiwebinc I have the code ready let me know how I can contribute
@tuminzee If it's not too much code, I would try to integrate that into https://github.com/shadcn/ui/blob/main/apps/www/components/ui/input.tsx and submit a PR. You could add the optional parameter
showPasswordToggleand if thetypeistext, the password would be revealed by default, and if it'spassword, it would be hidden by default. Clicking on the icon would toggle thetypebetweentextandpassword.
I have done exactly that but I am tacking it down using passing the type=password
@multiwebinc I have the code ready let me know how I can contribute
Just edit the file and submit a pull request.
perfect @multiwebinc I will create a pr by tonight thanks for the support, have a good day 🕺🏼
sorry for the delay @multiwebinc I made this PR https://github.com/shadcn/ui/pull/504 which only add the feature in the example pages, let me know where else should I add this. it should also be added to the main components ui, but I will wait for the feedback for this one thank you for being patience
https://github.com/shadcn-ui/ui/pull/504#issuecomment-1883379209
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.