how to use mui 5 in next.js 13

How to Use MUI 5 in Next.JS 13

updated 06/01/23 By frontendshape

In this section we will see how to use material ui in nextjs 13. Using MUI 5 in nextjs is easily you need just clone or download mui 5 with nextjs repo.

How to Use MUI 5 Next.jS

You can download or clone nextjs with mui 5.

curl | tar -xz --strip=2  material-ui-master/examples/nextjs
cd nextjs

Install and run npm:

npm install
npm run dev


import * as React from 'react';
import Container from '@mui/material/Container';
import Typography from '@mui/material/Typography';
import Box from '@mui/material/Box';
import ProTip from '../src/ProTip';
import Link from '../src/Link';
import Copyright from '../src/Copyright';

export default function Index() {
  return (
    <Container maxWidth="sm">
      <Box sx={{ my: 4 }}>
        <Typography variant="h4" component="h1" gutterBottom>
          Next.js example
        <Link href="/about" color="secondary">
          Go to the about page
        <ProTip />
        <Copyright />
mui 5 with next 13

mui 5 with next 13

MUI 5 Next.js with TypeScript Example

Run below command to use next js with typescript mui 5.

curl | tar -xz --strip=2  material-ui-master/examples/nextjs-with-typescript
cd nextjs-with-typescript

Install and run npm:

npm install
npm run dev