Adding the Material UI CSS framework to a React application

Rodrigo Kamada
2 min readFeb 27, 2022

Introduction

React is an open source JavaScript library for building user interfaces in WEB and mobile applications. Currently, React is at version 17 and Meta (formerly Facebook) is the main maintainer of the project.

Material UI is a CSS framework with foundational and advanced components, enabling you to develop applications faster.

Prerequisites

Before you start, you need to install and configure the tools:

Getting started

Create the React application

1. Let’s create the application with the React base structure using the create-react-app tool.

2. Install the @mui/material, @mui/icons-material, @mui/lab, @emotion/react, @emotion/styled and @types/date-fns libraries.

3. Remove the contents of the src/App.tsx file. Add some components as below.

4. Run the application with the command below.

5. Ready! Access the URL http://localhost:300/react-mui and check if the application is working. See the application working on GitHub Pages and Stackblitz.

The application repository is available at https://github.com/rodrigokamada/react-mui.

This tutorial was posted on my blog in portuguese.

--

--

Rodrigo Kamada

👨‍💻 Software Developer | ✍️ Technical Content Creator | 🤝 Open Source Contributor | 🎙️ Speaker | 👨‍🏫 Mentor | 🙌 Ambassador | ☁️ AWS Community Builder