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

281
Vistas
Using material ui and React, change the style of the `carrot` in TextField

I'm using MUI textfield per the documentation here: https://mui.com/components/text-fields/. while there are plenty of docs on changing the font of the input text, I have yet to see any docs or resources on how to make the carrot fatter. I'm looking for a style that simulates the console, and I have provided an image below. Below is the code for textinput I'm using, rather standard:


const translucent = 'rgba(255,255,255,0.1)';


const useStyles = makeStyles((theme: Theme) => createStyles({
    wrapForm : {
        display: "flex",
        justifyContent: "center",
        width: "95%",
        margin: `${theme.spacing(0)} auto`,
        // borderBottom: `0.8px solid ${translucent}`, // @TODO: remove this
    },
    wrapText  : {
        width: "100%"
    },
    button: {
        margin: theme.spacing(1),
    },
    multilineColor:{
        color:'white',
        borderColor: `white !important`,
        filter: 'blur(0.8px)'
    },
    overLayContainer: {
        display: 'grid',
    },

    overLayContainerInner: {
        gridArea: '1 / 1',
    },      
}));


/******************************************************
    @View
******************************************************/




export const TextInput = (props) => {

    const classes = useStyles();

    return (
        <>
            <form className={classes.wrapForm}  noValidate autoComplete="off">
                <TextField 
                    className = {classes.wrapForm}
                    fullWidth
                    multiline
                    InputProps={{className: classes.multilineColor, disableUnderline: true}}
                    rows   = "1"
                    margin = "normal"
                />
            </form>
        </>     
    )
}

enter image description here

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

0

The reason that there's no documentation on how to make a fatter "caret" is because this is not currently supported in browsers. You can change the caret color using CSS (eg. caret-color: red;), but if you want to mimic a console's "fat" caret, you may have to add your own element to the screen and then move it based on the input entered. Here is an old example of one way to do it and another which would also require your own JS implementation.

There is a proposed revision for caret-shape: block;, which appears to be what you're looking for, but that is not currently supported.

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