How to make mui avatar with border in react js?

Hi Friends πŸ‘‹,

Welcome To aGuideHub!

To make mui avatar with border in React js, You have to use mui avatar sx attribute and border with 2px solid #AE58EF. It will add border color on mui avatar.

Today, I am going to show you, how to make mui avatar with border in react js.


Install the following packages to mui avatar with border in react js.


npm install @mui/material @emotion/react @emotion/styled


yarn add @mui/material @emotion/react @emotion/styled

MUI material mui avatar with border example.

The below code is an example of add border on mui avatar using this code border.


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

export default function BackgroundLetterAvatars() {
  return (
      <Avatar sx={{ border: "2px solid #AE58EF" }}>G</Avatar>

In the above code example, I have used the @mui/material component and make border on mui avatar.

Here, we are provided code sandbox links for the above program make border on mui avatar. Then you can use whenever you want and do the changes as per your requirements.

Let’s check the output.

Try it Yourself

All the best πŸ‘

Premium Content

You can get all the below premium content directly in your mail when you subscribe us


Interview Questions

Soon You will get CSS, JavaScript, React Js, and TypeScript So Subscribe to it.

Portfolio Template

View | Get Source Code

Cheat Sheets

Cheat Sheets Books are basically Important useful notes which we use in our day-to-day life.

Related Posts