Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

287
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!