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

169
Vistas
Change TextareaAutosize color in React with mui

I'm new at React and using mui components.

While I'm trying to set color to TextareaAutosize mui component with code like this:

import * as React from 'react';
import TextareaAutosize from '@mui/material/TextareaAutosize';
import { blue } from '@mui/material/colors';

export default function EmptyTextarea() {
  return (
    <TextareaAutosize
      aria-label="empty textarea"
      placeholder="Empty"
      style={{ width: 200, color: blue, background: blue}}
      //Also not works: color="{blue}"
    />
  );
}

the color of the component not changed.

Thanks a lot!

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

0

<TextareaAutosize /> renders a plain HTMLTextAreaElement.

Which means this CSS will work:

textarea {
  background-color: #222;
  color: #BADA55;
}

Working demo: https://codesandbox.io/s/maxheighttextarea-material-demo-forked-5hc8nv?file=/index.css

If you want to scope the CSS to your particular instance, give it an id and use it in the CSS selector.

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