Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

132
Visualizações
Not able to override the default color of the material ui appbar
import React from 'react';
import { AppBar,Typography,Toolbar, makeStyles } from '@mui/material';

const useStyles = makeStyles({
  appbar:{
    backgroundColor:'#000000',
  }
})
const Navbar = () => {
  const classes = useStyles();
  return (
    <AppBar className={classes.appbar}>
      <Toolbar>

      </Toolbar>
    </AppBar>
  );
}
export default Navbar;

I am trying to change the default color of the appbar but this is not working , i tried using the char value of the color in place of the hex but that was also not working . Can anyone tell me whats wrong in this ? And yes , i am using the v5.4.3 of material-ui in this

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can do a one-off customization of a component with the sx-prop:

import * as React from "react";
import AppBar from "@mui/material/AppBar";

export default function ButtonAppBar() {
  return (
    <AppBar position="static" sx={{ color: "red", bgcolor: "black" }}>
      Content
    </AppBar>
  );
}

mui AppBar with colors manually set

You may also be interested in MUI's color system.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda