Vite + React + Material UI Install

Install Vite

npm create vite@latest

Enter Project Name, Framework choose -> React, Variant ->TypeScript

Done. Now run:

  cd name_of_folder_project_just_created
  npm install  
  npm run dev 

  VITE v5.2.6  ready in 265 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help

Go to https://mui.com/material-ui/getting-started/installation/

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

https://mui.com/material-ui/getting-started/usage/

import * as React from 'react';
import Button from '@mui/material/Button';

export default function ButtonUsage() {
  return <Button variant="contained">Hello world</Button>;
}

Scroll to Top