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

289
Visualizações
How can i do Inset FAB using Material UI in React?

i'm currently i'm working in a project that is required to have a "Inset Fab" button between containers. I saw in the Material Design documentation that the name of the component is called "Inset FAB", i'd got some tutorials on google (but didn't find many) on how to implement, but normally they are "workaround" (setting a background border with radius behind the button). I'm still puzzled in how to do it. Currently i'm using the MUI/Material UI 5.

Example of inset Fab

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

0

from what I understand inset is done through box shadows. specifically

boxShadow: "0px 0px 0px 5px white inset"

here is a code sandbox I threw together

import React from "react";
import ReactDOM from "react-dom";
import { Box, Fab } from "@material-ui/core";

const appBarStyle = {
  height: "100px",
  backgroundColor: "blue",
  position: "relative"
};
const fabWithInset = {
  position: "absolute",
  backgroundColor: "red",
  boxShadow: "0px 0px 0px 0px white inset",
  left: "50%",
  bottom: "0px",
  transform: "translate(0%,50%)",
  "&:onclick": {
    boxShadow: "0px 0px 0px 5px white inset"
  }
};
function App() {
  return (
    <Box style={appBarStyle}>
      <Fab style={fabWithInset} />
    </Box>
  );
}

ReactDOM.render(<App />, document.querySelector("#app"));
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