How to install Material UI v5

Key takeaways:

  • Material UI is an open-source React UI library using Google’s Material Design, with components optimized for React applications.

  • Version 5 was released in 2021. It injects only necessary styles for efficient performance.

  • Installation requires Node.js and a React project.

  • Material UI and icons are installed via following terminal commands.

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

    • npm install @mui/icons-material

Material UI is an open-source React UI library released in 2014. It consists of predefined components that can easily be used in the React applications. The library implements Google’s Material Design. Material UI components are self-supporting and only inject the styles they need to display. The version 5 for Material UI was released in 2021. In this Answer, we will see how we can install Material UI v5 in the React application.

Prerequisites

Before we begin, ensure you have the following:

  • Node.js installed on the system. You can download it from Node.js official websitehttps://nodejs.org/.

  • A React project set up. If you don’t have one, create a new React project by following our detailed Answer on "How to create a simple app using React".

Material UI installation

To use Material UI in the React application, we need to run one of the following commands in the React project directory's terminal:

Using npm:
npm install @mui/material @emotion/react @emotion/styled
Using yarn:
yarn add @mui/material @emotion/react @emotion/styled
Commands to install Material UI in React application

Further, we need to install Material UI icons in the React app. We can run the following commands to do so.

Using npm:
npm install @mui/icons-material
Using yarn:
yarn add @mui/icons-material
Commands to install Material UI icons

Material UI uses Roboto font for its texts. Therefore, we can run the following command to install the font.

Using npm:
npm install @fontsource/roboto
Using yarn:
yarn add @fontsource/roboto
Commands to install Roboto font

Execution commands

In the terminal below, a React application is configured. We can run the following commands and install Material UI.

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

  2. npm install @mui/icons-material

  3. npm install @fontsource/roboto

  4. To confirm that all dependencies for Material UI have been installed, we can check the package.json file and see that the dependencies are added under the dependencies section. Run the cat package.json command in the terminal to view the contents.

Terminal 1
Terminal
Loading...

After running the above commands, we can now use the components provided by the Material UI.

After installing Material UI, dive deeper into building stunning interfaces with its powerful components. Explore how to use Accordion, Buttons, Tabs, Cards, Avatars, Modals, Skeletons, Circular Progress, and even create a sleek Navbar. These hands-on Answers will help you master the essentials and design beautiful, functional web apps.

Explore the following projects for hands-on practice in creating real-world applications with React. You can enhance these projects by incorporating Material-UI for a polished and visually appealing design.

Frequently asked questions

Haven’t found what you were looking for? Contact Us


How to install material UI in React 2025?

Install with npm install @mui/material @emotion/react @emotion/styled command.


What is mui V5?

MUI v5 is the 5th version of Material UI, a React UI library with updated components, theming, and styling APIs.


When was material UI 5 released?

Material UI v5 was released in September 2021.


Is mui 6 stable?

Yes, Material UI v6 is now stable, as officially announced on August 26, 2024.


Who owns Material UI?

Material UI (MUI) is owned by the company MUI, Inc., which was co-founded by Olivier Tassinari and Matt Brookes. The company provides the Material UI library, which is one of the most widely used React component libraries based on Google’s Material Design principles.


Free Resources

Copyright ©2025 Educative, Inc. All rights reserved