Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

179
Vistas
How to get the two Input control elements look exactly same in terms of background and border?

I am using Material UI to create a password field and normal textField

        <OutlinedInput
        
   
        type={showPassword ? "text" : "password"}
        variant="outlined"
        size="small"
        sx={{
          height: 38,
          width: 190,
        }}
        endAdornment={
          <InputAdornment position="end">
            <IconButton
              onClick={() =>
                setShowPassword((showPassword) => !showPassword)
              }
              onMouseDown={(event) => event.preventDefault()}
              edge="end"
            >
              {showPassword ? <VisibilityOff /> : <Visibility />}
            </IconButton>
          </InputAdornment>
        }
      />

and here is the normal text field -

<TextField
               
                onChange={onChange}
                variant="outlined"
                size="small"
                type="Text"
                className={classes.Text}
              />

The problem is that my password looks very different also the mouse click for the password entry is not good. Here is the screen shot. How can I make it look exactly like TextField but with that eye icon for password - show and hide?

Icon button and TextField

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

You're using OutlineInput and TextField, respectively. These most likely have different CSS rules applied to them. Use the same component, or modify them so that their CSS are the same, and then you'll be good to go.

about 4 years ago · Juan Pablo Isaza Denunciar

0

In the TextField, you can set endAdornment and add the icon, I provide the code snippet that you can try.

<TextField
          label="SIP Display Name"
          InputProps={{
            endAdornment: 
            <IconButton>
                <Visibility />
            </IconButton>
          }}
          .........
          variant="filled"
        />

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda