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

[TextField] add show password feature #44778

Open
4rthurrr opened this issue Dec 15, 2024 · 3 comments
Open

[TextField] add show password feature #44778

4rthurrr opened this issue Dec 15, 2024 · 3 comments
Assignees
Labels
component: text field This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation new feature New feature or request waiting for 👍 Waiting for upvotes

Comments

@4rthurrr
Copy link

4rthurrr commented Dec 15, 2024

Summary

add show password feature when typing a password in sign in form and signup form (it s not apper in chrome)

Examples

No response

Motivation

No response

Search keywords: show password

@4rthurrr 4rthurrr added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 15, 2024
@mj12albert
Copy link
Member

@4rthurrr You can implement this using InputAdornments (doc)

const [showPassword, setShowPassword] = React.useState(false);

render(
  <FormControl>
    <InputLabel htmlFor="password">Password</InputLabel>
    <OutlinedInput
      id="password"
      type={showPassword ? 'text' : 'password'}
      endAdornment={
        <InputAdornment position="end">
          <IconButton
            aria-label={
              showPassword ? 'hide the password' : 'display the password'
            }
            onClick={handleClickShowPassword}
            onMouseDown={ev => ev.preventDefault()}
            onMouseUp={ev => ev.preventDefault()}
            edge="end"
          >
            {showPassword ? <VisibilityOff /> : <Visibility />}
          </IconButton>
        </InputAdornment>
      }
      label="Password"
    />
  </FormControl>
)

it s not apper in chrome

Are you using Edge? You may be referring to Edge's "password reveal button", see #44756

@mj12albert mj12albert added component: text field This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information labels Dec 16, 2024
@mj12albert mj12albert changed the title add show password feature [TextField] add show password feature Dec 16, 2024
@mj12albert mj12albert removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 16, 2024
@mj12albert mj12albert self-assigned this Dec 16, 2024
@aarongarciah aarongarciah added the new feature New feature or request label Dec 19, 2024
@DiegoAndai DiegoAndai added waiting for 👍 Waiting for upvotes and removed status: waiting for author Issue with insufficient information labels Dec 19, 2024
@DiegoAndai
Copy link
Member

Hey, thanks for the report!

I added the waiting for 👍🏼 label so the community can vote for this new feature. If you want to see this implemented, please add a 👍🏼 reaction to the issue's description.

@DiegoAndai
Copy link
Member

DiegoAndai commented Dec 19, 2024

An option is adding a demo to the docs.

@DiegoAndai DiegoAndai added the docs Improvements or additions to the documentation label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: text field This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation new feature New feature or request waiting for 👍 Waiting for upvotes
Projects
None yet
Development

No branches or pull requests

4 participants