ui icon indicating copy to clipboard operation
ui copied to clipboard

[Input Password]: eye icon doesn't show

Open fernandops26 opened this issue 2 years ago • 11 comments

When you load first time a value of a input type password, the eye icon doesn't show. Following below its a selected input:

Screenshot 2023-05-01 at 12 40 35

fernandops26 avatar May 01 '23 17:05 fernandops26

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.

puneet-sarhali avatar May 02 '23 05:05 puneet-sarhali

+1 to This. Maybe as a variant, instead of default

dBianchii avatar May 03 '23 17:05 dBianchii

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?

tuminzee avatar May 09 '23 12:05 tuminzee

@multiwebinc @shadcn @puneet-sarhali have a look at this, what should be the next step here Should I implement in all the components?

pasword

tuminzee avatar May 09 '23 14:05 tuminzee

@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 avatar May 25 '23 20:05 multiwebinc

@multiwebinc I have the code ready let me know how I can contribute

tuminzee avatar May 25 '23 20:05 tuminzee

@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.

I have done exactly that but I am tacking it down using passing the type=password

tuminzee avatar May 25 '23 20:05 tuminzee

@multiwebinc I have the code ready let me know how I can contribute

Just edit the file and submit a pull request.

multiwebinc avatar May 26 '23 04:05 multiwebinc

perfect @multiwebinc I will create a pr by tonight thanks for the support, have a good day 🕺🏼

tuminzee avatar May 26 '23 04:05 tuminzee

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

tuminzee avatar May 30 '23 21:05 tuminzee

https://github.com/shadcn-ui/ui/pull/504#issuecomment-1883379209

anasmohammed361 avatar Jan 09 '24 16:01 anasmohammed361

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.

shadcn avatar Jul 08 '24 23:07 shadcn