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

141
Visualizações
how to set the border color to Card component in React material ui

how to set the border color to Card component in React material ui .I have tried style property

style={{borderColor:"red"}} in code but it won't work. Is there any Solution?

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

0

What you're doing works, the problem is that you can't see a border without width nor style (solid, dashed, etc).

Try using style={{ border: "1px solid red" }}

about 4 years ago · Juan Pablo Isaza Relatório

0

You should use the borderColor prop on it like this:

<Box borderColor="primary.main">…
<Box borderColor="secondary.main">…
<Box borderColor="error.main">…
<Box borderColor="grey.500">…
<Box borderColor="text.primary">…

And the border size with the border prop like this:

<Box border={0}>…

See full API here: https://material-ui.com/system/borders/

about 4 years ago · Juan Pablo Isaza Relatório

0

You can use the border CSS property on the Card component to set the color.

<Card sx={{ border: '1px solid red' }}>
  <Typography variant='body1'>This has red borders</Typography>
</Card>
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