Podcast Lookup

Building a React Project with Material UI (MUI) – Complete UI Development Tutorial

ReactJS Developers Podcast

  • December 3, 2026
  • 1 h 8 min
  • Episode 12
Episode page
About this episodeIn this episode, we explore Material UI (MUI), one of the most popular React component libraries for building modern, responsive, and…
In this episode, we explore Material UI (MUI), one of the most popular React component libraries for building modern, responsive, and visually appealing user interfaces.Material UI provides a comprehensive collection of prebuilt React components based on Google's Material Design principles. It helps developers build professional web applications faster without having to create every interface component from scratch.Through this practical project, you'll discover how to integrate MUI into a React application, customise components, create responsive layouts, and build consistent user interfaces.Whether you're a beginner learning React or an experienced frontend developer looking to improve your UI development workflow, this episode will help you understand how to use Material UI effectively.What You'll Learn
  • What Material UI (MUI) is and why developers use it.

  • Installing and configuring MUI in a React project.

  • Understanding Material UI components.

  • Working with buttons, cards, forms, and text fields.

  • Creating responsive layouts using MUI Grid and Box.

  • Customising component styles and themes.

  • Understanding Material Design principles.

  • Using MUI icons and visual components.

  • Building reusable UI components.

  • Improving accessibility and responsiveness.

  • Integrating MUI with React state management.

  • Best practices for building professional React interfaces.

Who Should Watch?
  • React.js beginners and intermediate developers.

  • Frontend and JavaScript developers.

  • UI/UX designers interested in React implementation.

  • Software engineering students.

  • Developers building dashboards and business applications.

Transcript

From the publisher

This transcript comes from the podcast’s own feed, shown as the publisher wrote it.

Building a React Project with Material UI (MUI) – Complete UI Development Tutorial

00:00—
  1. Speaker 1

    Now we are going to make a very beautiful UI design. This UI design is based on Material UI. We are going to use Material UI. In the previous lecture, we discussed the entire Material UI. And that discussion is going to be useful to you. Rest, we will learn a lot of extra things. Some of the starting points, I will tell you about material UI and some extra things which I didn't tell you in the previous lecture. But now you are going to need it in the project. I will tell you about the theme and how you can make your own styled components. Because we are going to copy paste like this, we are not going to do much. But you should also understand that what we are doing in the material UI. So, to explain that, I have told you something in the starting. So, you can see that carefully. And after that, the project we are doing, you must be seeing something like this. As you can see, it is looking very beautiful. I have replicated the image. I don't have any data yet. You can take data from the database or you can make some data of your own. That depends on you. And here also, you can see that the text is written randomly. I have shown you by putting one or two icons. And I have told you how the text can be changed. Rest, you can do it yourself. There will not be much to change the text, so you can easily change the text and the map bar is also as it is. So you can see it here as well. MUI is also clearly visible here, so the logo is also visible and here I have changed an icon and shown how to remove the badge etc. and how to use it in a customized way. You can work by making your own component. You will get to learn a lot and how to make your own customized component. How to combine everything and how to work by combining it from different places. You will get to learn all that here. Along with that, this project is also responsive and it is a complete material UI. It is not that we have put material UI and half tailwind CSS here. There is nothing like that. And close it for now. I will show you its responsiveness. So, here. See, it is very responsive. And we have made all this using the material UI. So, whatever we are using here. Completely material UI. Nothing extra. We have not written any extra CSS line. One line is written. That star one. Universal one. Nothing else is written. And tailwind CSS is also not used here. This design is made on the entire material UI. So you will have fun in the whole lecture and you will get to learn a lot about Material UI. So let's quickly start making the project. So this is our React folder where all our code is organized and now we have to install a new project which we will definitely do with Vite. Quickly search for Vite here and come to get started. From here, copy the command and paste it and install the project. And you must have done this by now. I can hope so much now. So this project, we quickly give the name here. We give the name of this folder for the time being. And here we will select React framework. Variant Java script will be ours. Experimental no. And do we have to start? No, we don't have to start now. Because now we have to install more things. Material UI etc. So we will come inside the wheat folder with CD wheat. Not wheat, actually project. We will come to the project folder. So we have come to this folder. This is our project. And here we will first do NPM I. So that whatever packages are needed in it, which is mentioned in package.json, will be installed. And then after this, we will come here. You are learning all this material UI. That means you know how to install and how to do it. And I have told you everything. So in the material UI, you have to search and come to the website of this material UI. And actually you must be knowing that MUI has been named here. I have told you in the previous lecture. So you can also search MUI.com and here you will get MUI. Here you can explore the core libraries and here you get three libraries. Basically, there are only two component libraries. Rest, you have MUI system utilities mentioned here. So you have to come to the material UI and click on get started or you will come to this page even if you will directly search for the material UI. So let's quickly install the material UI, you have to come to the installation, they have given it here too. So you just have to install it, come to the documentation, find the installation and here is the command for installation, copy from here and come here and paste. And it will take a little time to install. What else do you have to install? Tell me quickly. Material icon. Okay. We will also need an icon. The components that we will take, we will also need icons in it. So we will also copy and paste the material icon from here and install it. So it will take a little time. Let it be. Till then, let's clean up the dirt here. And it's done. So quickly install the material icon here. And close it. This too. Close it and remove it from here. Very good. And it is getting installed. So let it install. Then we will see how to do the work in the future. I will also do a little bit of warm-up. Whatever we did in the previous lecture, a little bit. So you get an idea of how to use it and how to work in the project. It is taking a lot of time to install. Icon pack takes some time to install and it is done. I will run it from npm run dev and hide it. Our project has been run and now it is empty. First of all, we have to see how it can be used. I search a simple button here. And I will show you by putting a button. Suppose I want this button, where this content is written, of the same design. Or you can take any other, it is your choice. I am showing you by taking one, you have to use it in the same way. So I want this button, so see here they have given this button. And you will do the expand code. Okay, do the expand code carefully. Because here you have to import something from the material UI. So you will import, you will get this button and this button is used here. You do not have to use the stack. So you can see that it is imported here. So we will do this from here. Copy. And you can also make changes in this code, so copy it carefully. I had also pasted it. So here we will import and here I want this button, so I will take this button. I imported this button component here and here I will use this button component. So what do we see here? So definitely our button is coming here. Now I will tell you how you can customize this because it is very important to make a project. There will be a lot of customization needed in the project that we will make, so you should know that. Suppose I want some changes in this button. For example, I want some other color here, so I have given the color of success here, I have to take this. So how will I take it? So here I can clearly see in the code that it is being used in the same way. If I see, they have imported the button here. This is the same button, but the variant is the same. You can change the variant as well. But the color is success, that's why the button is of this color. So if I pass a color prop here, color success, then you will see that the color of the button will change. And if I want to use something else here, then you can see all the suggestions by pressing control space. I will click here and enter the space bar in the control space. Here you are getting all the suggestions. For example, I want to give the warning color here. See, the warning button has come here. And you can give your own style and color in the customize bay. So here you have to use the sx property. And here you have to pass an object in the key value pair. Just like the normal style attribute, you had to pass an object in the key value pair. You have to do the same here. An object like this. Okay. Look carefully. SX and an object like this and whatever you want to give here in the same way as in the normal style, just a little different here in the material UI you get more things. So I want to give the second color here, red. So will it be red? See this is red. If I make it blue here, will it be blue? This is blue. And I can put more things here, like here you can put If you want to add a hover effect, then I will add another object here. And what all things I want to change on hover. So I want to give a different background color here. Like I want to make it green from blue on hover. So as soon as I hover on it, see it has become green. And there is a little transition too, so it looks beautiful. So in this way you can do a lot of things. What color you want when the button is disabled etc etc. You can do a lot of things here and you will know how to do it from documentation. As you come down here, there is an icon here. How will you put the icon in the button? So see here, they have told you where you have to put the end icon and start icon. If you want to put it in the end, then you will use the end icon prop. If you want to put it in the start, then you can use the start icon prop. So, I want to put an icon here. Where will you get the icon? Obviously, from the material UI icon. See this. As they have used the delete icon here. So, where is the delete icon coming from? Material icon and slash delete. Okay. You can also search here. Material icon. Icons. Okay. You will search. You will get to see a lot of icons here. You have a lot of icons. Suppose you want to insert this icon for the time being. So from here you will copy, see it has been copied, just click on it and it will be copied. So this import command has been copied, I will paste here and you have this icon. Now you can use it in two ways, like I can use it as a component in this way. So you will see here, see you have an icon and And if I want to use it in the button, then I have just seen how it can be used. So I search the button here. And I have to put the icon in the button, in the start and in the end. So I just showed you that you can use the start icon or the end icon. So I want to put it here in the start. So I will say start icon. Start icon. And I don't know why I am not getting the suggestion. So... Start icon. No problem. I am not getting any suggestion. So I am writing here as it is. Okay. And use it like this. Okay. I have here. No. Everything is fine. Here SX is closed till here. Or. Okay. It is closed till here. I am putting it in the wrong place. This is the whole. This is the curly braces. And then after that these blue curly braces. And after that you are seeing this one. Curly braces of purple color. So you have to use it here. Start icon. Okay, so far we are getting suggestions. So start icon and I have to put an icon, so how can I put it? Something like this and here you come and see if you want to pass the name or pass as a component. So as a component you have to pass here. So I want to use this icon here. Okay, so I will pass this icon like this and here you will see this icon attached and it is adjusted very nicely. Everything is already made here, you just have to use it. So in this way you can put an icon in the button and you have to read the documentation in the same way. It is not that they have made one component, so you have to use it in the same way. You can make your style by mixing different styles of multiple components or you can give your style too. Okay, you can make your style component too. I will show you this too. You will also need this a lot in the future, in projects etc. So you have understood so much that how you can do customizations etc. And here you have to give your style, so you can give it in this way. Okay. You can go and see in the documentation. Now if you want to make your own component. Like this button. This is coming from the material UI. If you want to make your own styled component. Then what will you do? So it is very easy. It is very easy. Here I give a name to my button. My button. I want to make my own styled component. So I will use styled here. And you will get this styled from the material UI. I am using the material UI. But I want to make my own customized component. So, style is imported here. If not, then you can import it yourself. Style is here. I will put parentheses here. And here I can mention what style I want. Like I want the style of this button. And by making some changes in this, I want to make my own component. What did I say? Listen to me carefully. Here is a styled component. As this button is made, this button, wherever I use the button, so there you can see the button in this way. As if I use this button, then I write hello in the button. So see how the button is visible here. For now, it has also disappeared. I don't know how, comment here, maybe there is some error. So this button is visible to you in this way, by default. By default, the normal button is visible to you in this way, which is giving you material UI. You can see the normal button of the material UI in this way. Now you want to make your own component by customizing it. Which you should use the same style everywhere. So I have copied the style here. Which style have you copied? The style of this button. I will pass the button here. And where is this button coming from? From the material UI. Okay. So this is your my button component. Now wherever you use this my button component. There you will get the same style of button. My button. Okay. And here I write hello. So see here. Let's reload it. Why have I given this? I will tell you. See here, you have the same button. The special thing is that you can mention your own styles in the customized way. That's why I put another parenthesis here and here is an object where you can write style in key value pair. So I want to give bg color here. Alright, the color is white. So, in this way you can make a component in your customized way. For example, I have made a component of my button by customizing it. I have made a component of my own by using the old button. Now, wherever I will use this component, you will see this style. So, you can make a custom style by mixing the material UI and your own style. And you can pass the style in this way. And you can also change the theme. If you have seen the previous lecture, then you will have the idea of the theme. Rest, I will also recap that once in the short. One more important thing which I did not tell in the previous lecture. In one lecture, you won't have it complete. I have already told you that material Y is very big. So, you will keep making projects. You will keep getting ideas. Okay. And whatever I am telling you, that much is enough for you. Further, by exploring yourself, to make projects, that much is enough. So, suppose I have to write something like heading, paragraph, etc. So, here you have typography. Okay. And you can go and see here. Typography. See, they have written typography here. So, one by one, you can explore components. So, I know that headings or paragraph or something like this, you have to write in a styled way, then typography is used here. So if you come down, then you will see that if you want to write a heading, paragraph etc etc in this way, then you can use typography here. There you get the variant, h1, h2, h3, h4 etc. And here you can pass your props or something or you can style it by looking at the property or something. So I will write a typography here and show you. Typography, typography, okay, I have this. I have removed a fragment from here. So typography, see from where it is coming, from the material UI. As soon as I enter, your typography has been imported here. And in this typography, I write hello, I am heading. So is this heading? Not at all. This is a normal text. Hello, I am heading is a normal text. If you want to make it a heading, then you will use variant here and you will pass h1 here. So, you have this heading. Okay. H1, H2, you can mention here. Again, you will enter control space. So, you will start getting suggestions here. That what you have to use in variant body 1, body 2 and then H1, H2, etc, etc. So, you can come here and see. They have given a lot of things. And again, you can make customized components here. Okay. Like they have made their div here. Like we just made our button using style. Similarly, you can make your own div, paragraph, heading, etc. by mentioning your style. And what is this theme.typography.button doing? So they have done it to link with the theme. I will just tell you that too. Let's discuss the theme. Okay, all these things are done. And whatever need will be there, I will keep showing you. And try that the way I am telling you by reading the documentation, I don't remember all these things. In the same way, you will understand by reading the documentation and make projects. So let's search the theme here. The theme will not come directly here. In the menu of customizations, you will see the theme option. If you come to the default theme viewer, you will see that all these properties are there in the key value pair, basically from where you can design the theme according to what should be the main color, what should be the secondary, what should be the primary. If you come to the palette, then all the colors are mentioned in the palette. Mode should be dark or light. And here you can also switch dark mode, light mode, you can also make a button. So common here is that in the primary you have this main color, light, dark. Contrast test, secondary, main color, light, dark. So you can tell all this. Like we were using secondary color, so this color was coming here. You must have seen. If I use secondary color here, then you just saw that this color was coming to you. This color will not come now because I have given background color blue. So comment with this for now. And now see secondary color is coming to you. Purple. So where is it coming from? By default, you can change it. So how will you change it? Here I will make a theme.js in the src folder and the project has just started. I will leave the theme as it is. You can add more things according to you. In theme.js, I want to make my custom theme. So how can you make it? Customizing the theme here. here. You will get documentation here. Customizing the theme is here and here. You come here. And if you do a little down, then they have told you how to expand code here. And how you have to create a theme. They have told you all that. So you get create theme from material UI. you will use create theme here, which is coming from material UI, and here you can make your theme, something like this, you will make an object, and in the object, in the same way, which was given in default here, you can mention breakpoints, you can mention direction, you can mention palette, In the palette, you have mode, common, primary, all this will be in the object format. So, suppose you have a global default object, and you can override the changes you have to make in that object and change it here. For example, I am getting a suggestion here. In the palette, again an object will be created here, because see, this is all an object. The palette is an object, and you have all this in the object. So, this is an object and you have multiple key value pairs in the object. So, I don't want light, I want dark. So, here I can mention mode dark or light. So, for now, let it be light. And what else can be done? And in primary color, let's change the secondary color. This color is in the main of the secondary. I want to put some other color in the main of the secondary. Secondary and in the secondary, I want to change the main color. In the secondary, let's assume the main color is here. I want to give it in blue color. Now you will see that the blue color is not applied because we have not applied the theme yet. We have created the theme but not applied it yet. So here comes the theme. Now let's export this theme here. So it has been exported. Key value pairs or you can say that we have defined our colors. The default colors etc. We have overrided it and defined our colors etc. So now wherever we will use this theme and basically first of all we have to provide the theme. By using the theme provider which you get in the material UI. Here you will come to documentation. You will go to customizing the theme. And here you will scroll a little bit. So I just showed a little bit. Come down. Where it was. Where did it go? Look at this. You will do expand code here. So you will get here that by using the theme provider, you have to put your theme in the theme prop. So I will come to app.jsx. And here or you can also apply in main.jsx. There is no need for strict mode. By removing it here. And here theme provider emotion slash react. And you also have this from material UI. Emotion slash react. And see where it is imported actually. So, theme provider is imported from material slash styles. So, import material slash styles from theme provider. We will wrap our application in the theme provider. We have wrapped our application in the theme provider. Now we will pass our theme here. Where will this theme come from? So obviously theme.js. We have just made it here by using theme.js create theme. So we will pass this theme here. Where did it go? It is going to sell paper. Do we have to buy paper? So here we have passed the theme. It gets disturbance in between. Okay, so we have put this theme here. And now you come here and see that you have the secondary color blue. Which we have put here in app.jsx. See we have used the secondary color. And the color of the secondary we have given here. This color. Okay, by default you had some other color here. We have changed the color. If you want in the primary, then I can show you here. come to theme and actually come to app.jsx first let's see which color is in primary so in primary you have this blue color so suppose I want to make primary red ok I want to make red in primary color so I will put red here and what else so primary red will be ours in this way we can't put it we have to put it in full hexa code so red color wait a minute remove it like this and copy red color from here Copy and paste it here. Let's reload. This is the secondary color, right? Let it be the primary color. We had to change it in the primary and change it in the main of the primary. So this is done. And here the comma is missing, so we put a comma. Alright. So see, the primary color has become red. Now wherever you have this blue color button, the blue color here, whatever components you will use, like you are using navbar, So in light mode, it is of blue color. But now in your application, you will see that red color. Because you have made the primary color red. So in this way, you can customize the color of the whole theme according to you. And you can easily switch between light mode and dark mode. You just have to change the mode. Here, like in secondary and primary, we changed the main color. Now let's switch to dark mode. So in theme, your mode was light. We make the mode dark. So, see here, we have not mentioned anything for dark mode, but if you remove it, so you see, something like this is visible in dark mode, and if it was light mode, then it would have looked like this. Okay, so you can mention everything here, you basically have to come and read the documentation, you don't have to do much, you have to read the documentation. So, you see here, what are the changes happening when the light is switched to dark mode. So, as I am switching to dark mode, so see, this light, and here as soon as I switch to dark mode, This is changing and here the divider is changing everything. So you can understand by looking here that when what things have to be changed and according to what you have to keep all the things. And if you do all expand, then you can see this whole expand. And actually there are a lot of things, but you have to keep in mind the need that you will get. Remove the rest for now. And I hope you have understood so much that how the theme can be changed. We are going to do all this in the rest of the project. So, I have given a recap and I have not discussed some things in the previous lecture. So, that is also discussed here. And actually, I have to discuss the material UI in this way. You don't have to read it in one go. Slowly, whenever we will do the project, you will get to learn something new. Okay. So, this is our main.jsx. We will leave it like this. We will come to app.jsx and remove all this. And for the project, we will ready our folder structure. So everything is removed here and now we start the project. For now, you guys practice a little bit, try to make a hold of how to work and then I drink a little water and then we start. So now we are ready to design the UI using the material UI. Let's see how much time it will take to design a UI using the material UI. I am telling you that it will take a little time but if you are doing it yourself and you practice a little bit on the material UI then you will see that you can design a good UI in 5-10 minutes. So, I am making a folder here named components and just designing the UI is our main motive and we are not focusing on logic. So, we will make a folder named components. What do we need? So, first of all, we need a navbar, navbar.jsx. And by coming to app.jsx, we will put this navbar here. Okay. And definitely, we will not get suggestions. Okay. First of all, let's come here and search navbar. Navbar. Navbar. And actually, navbar is not here, it is appbar. Okay. So, if you are not getting navbar, then search appbar. So, here you have to come to appbar. Appbar. And here you can see which app bar you like. So this app bar is looking good. Search bar is also there, logo is also there. And icons are also given. So it is looking good. So here we will copy it. Here is the full code. And see that TS is not selected. TS TypeScript is not selected. JavaScript is selected. So copy it here and paste it here. So this is your navbar. And see here, what I just told you that you can use styled to create divs according to you, so they have done this here. And if you read the whole thing, you will understand how it is working. And this theme is working in this way. You get a theme parameter by default from the create theme you have done. And you can use it. So, you have to read it once to understand the position, border, radius, background color. It is very simple. I am giving you a little bit of documentation. You will see what is he doing and how he is doing it. If you are not able to understand, you can do GPT. If you are still confused about the styled component, then I will explain it in detail. a search icon wrapper is made here, style input base, so many customized components have been made in this way and this is our final primary navbar. So let's do this navbar and we are also doing default export here. and useState etc. are used here. So logic etc. are also written here. You just have to implement that variable in your application. That's it. So everything is done here already. And here in app.jsx, let's put this navbar and see how it is looking. Navbar and maybe now suggestion should be given. Navbar, yes, suggestion is given. Okay, import is also done. And if it doesn't happen, then you can do it manually. There is no issue. So we have put this navbar and come here and see how it is looking. So it is looking like this and it is looking like this because some default styles are already given here. So we will remove all this. We will remove this from app.css, we will remove the whole thing. So now it is looking like this and we will do one more thing by coming to main index.css. Here we will make the margin of all by default zero. So look at this, now you can see this type of navbar and it is a little zoom. So, let's do it at 100%. So, your map bar is ready. Rest, you know how to change icons etc. Shall I show you one by one? Come here in icons. Suppose, I want to put an icon of cart. So, I come to icons and you can search the icon. I want cart icon. So, let's take this swapping cart icon here. And come here in map bar. And at the top, you have to import here. And this cart icon, you see where the icon is used. So in the last, there are 2-3 icons. So in the last, see here. More icons. There are more things here. They have implemented the logic. What should be on click. So see the icon button here. One icon button is this. Notification icon is given here. Let's put this swapping card icon here. This is correct or not. So, see here, this shopping cart icon is attached. Okay, see here, there was a notification icon. This one. So, I removed it and made it a shopping cart icon. This shopping cart icon came. You can give a badge on it or not, as you wish. See here, they have attached a badge. I will remove this badge. Actually, the whole icon has been removed. From here, icon button. And here, it is wrapped inside the badge. So, you want that there should not be a badge in this icon. So, here you comment the badge. So, here you can see only the icon. There is no badge on it. And if you want the badge, then here you can uncomment it like this. Wait a minute. Uncomment it and wrap the icon in the badge. So, your badge will be applied on the icon. Okay. So, in this way, you can do everything easily. You just have to see and understand that how the badge is attached. And if the icon is attached, then how is it attached. You can change the icon, you can remove the badge, you can apply it. So in cart, you should have an icon like this, basically you should have a badge, that 17 items are already added or not. Okay, it should look like this. So this UI is our perfect, it should be like this. And here the user icon is coming and here profile, my account, etc. etc. So navbar is our proper, there is no issue. Rest, if you want the name here, EMUI, logo, etc. So you can apply it. There should be no problem in this, this is basic. You can use HTML to add icons here. You can add icons or you can make your own logo by using image tag. You can work here easily. Okay. So, our map bar is made. Map bar is made. That too so quickly. And remove index.css and app.css. Now what you need is you have to make three parts here. One part will be our sidebar. One right bar will be coming this side. And one in the middle will be the feed page. You have to make this much. And let's make this and see how much time it takes. So, here is our sidebar.jsx rafc. You are getting it, right? It doesn't look too fast, right? Actually, it shouldn't look fast because we are using made-up components. But if you are feeling that fast, you are telling such fast things. So, in the previous lecture, we have discussed material UI. I have still done a warm-up on how to use it. And now we are doing a project. So, now you shouldn't feel it. And if you are feeling it, that means you are skipping and coming to the direct project. Okay? So, here, sidebar, so search sidebar here, sidebar and search sidebar and see what kind of sidebar you want, here you don't want this type, you can take this sidebar, the rest, the rest, the rest, this sidebar is also fine, search sidebar or search list, if you want to make sidebar yourself, So look here, you also have this sidebar coming. Sidebar basically you have to make it yourself, UI etc. You can search the list, you will get the list in this way. Rest, the whole sidebar should be made. So you will search the sidebar, you will see that different sidebars are available. See, open this, this sidebar has come. This is a sidebar you have. Then here you have this sidebar. So you are getting this made. You can also do it this way, there is no issue. If you want to put this, you can also put this. Should I put it and show this one? So, here show code and js is selected already. You have to copy from here. And after copying, you will paste here. So, this is your sidebar. Okay. And the content coming in it is this, your main. Okay. Main. Here you have full content coming. So, in app.jsx, just below it, sidebar and sidebar will not be named here as far as I think. Let's see here. So, this main is a styled component basically they have made here custom style component and this app bar is also done here in a customized way. So close it for now and actually close it completely and close this drawer too. This is our persistent drawer left. So let's call it sidebar. Okay, so we will also get suggestions here by changing the name. So sidebar and see this dot slash component slash sidebar. See if it is importing from the right place or not, so that it does not import from the material UI. So the sidebar we have just made in your component and basically made using the material UI, that sidebar is coming to you here. So look at this, let's reload and here you have the sidebar, it is working. We have made a new bar, which has become a new bar, and this whole thing is coming from above. And it is also fine if you want it this way, then definitely you will do a new bar above and a new bar below. So in this, you can style the whole new bar. You can also do this, which you have here in the new bar. The components that were inside the bar, you can copy from here and put it inside the sidebar here. So it will look something like this. So, this is a made-up work. You will get the whole thing made-up. It won't be fun. We try something of our own. Rest, you know how to use this. In this, you will pass children as a children. And you will receive here. Like sidebar is here. So, in this way, as a children, if you want to receive something, components, etc. You can do it here. Like in main, this whole header and this I don't know what is given. So, here, we will Let's pass it. And remove all of this. Now our children will be rendered here, whatever we are sending. So this is all removed. Now inside sidebar, we have used sidebar in app.jsx. So now in this way, whatever children will pass here, you will be able to see it here. Whatever you will pass, typography, card, whatever you have to render here, heading, something, something, something, you can see everything here. See this. So inside sidebar you can pass anything as a children and we have received that children here. So this is a matter of react, there is nothing to do with material UI here, we have received simple children here and put it here. So this sidebar is ready for you. So you can do it this way too, but it will not be fun, then this is done. Okay, it was a two-minute work. Let's try something of our own. So remove this in this sidebar and remove from here. And for now, we should have seen the map bar here, but there was some error. Okay, sidebar, you must be telling here that you have not exported the default here. How are you importing? So let's come here and make a sidebar. We will take a list, okay? List. And just search the list here. You will get different different lists. So we will make this sidebar. And this one looks good, looks beautiful, right? There are many more things here. So you see, you don't need all this. If you need a button or something, like I can see this one here, then I will use it as a light mode in dark mode. In sidebar only. Okay, so we will take this one and let's take it. Where did this one go? So from here we will do show code and copy from here and paste here. Okay, so this is ours. apply this sidebar below the app.jsx. So let's come and see how it is looking. And let's reload. So this sidebar is coming to you in this way and it is looking very nice too. Okay, we don't need only sidebar, first let's make a cover where we will get sidebar, rightbar and feed section in the middle. So for that we have to use something like flex and for this we can use stack. Search for stack and here in documentation you can see how to use it, how to give spacing in stack, direction, row, column. So you have to use stack in the same way as normal flexbox. So stack, wrap sidebar in stack. and along with sidebar we will have a feed page feed.jsx and along with that we will have a write bar writebar.jsx and rafce alright in feed rafce and here take a box and box is also coming from your material ui and this is feed and here we will give color basically color is background color, bg color, bg color, in box there is bg color and color both, ok, bg color I will give red here, and come to app.jsx, you are understanding, feed we have made here normal, and box we have used, which we have taken material device, normal box, simple box, like normal div, you can understand in the same way, simple box, where you can keep your things, So the box simply has a feed written here. We have given the background color red. So let's use the box and see. We basically put the feed here just below the sidebar. This is our feed. And along with the feed, in the right bar also here, this is our box. And BG color. Okay, the box was not imported. Material wise, it is now imported. And here we will give BG color, blue. Okay. And coming here, Let's also put a ride bar. Now let's see how it looks. It looks like this. So we don't want it like this. We have to change its direction here. So I will say its direction here. Column. Okay. So sorry sorry row. Direction will come here in this way. So it came here. This is here and this is here. And I will tell it that justifyContent spaceBetween I am not using that SX property here. I am directly here, which is available in the stack. You can put direction direct here. You can put justifyContent direct here. So here it is coming to you in this way. And we will do one thing here in the sidebar. Now because we have used it like a normal flex box. So here we are in the list in the flex. We have to take a box here. So let's take a box. What is the problem? We will get this box from the material UI. And this is our box here. Okay. And some changes have not been made yet. So here in this box, we will say that Flax 1. Okay. Means it will take the whole space. As much space as there is here. But we don't want this. We want the feed to be a little bigger. So in the feed, we will take We will call it flex4, which means its width should be 4 times the sidebar. And we will call the right bar as the size of the sidebar. We will call it flex1. That means, if you understand carefully, I gave the sidebar 1, I gave the feet 4, and I gave the right bar 1. So, I have maintained the aspect ratio of 1 is to 4 is to 1. That means, the feet will be 4 times the size of the sidebar and right bar. sidebar, rightbar will be 1 and feed will be 4 means it will be 4 times bigger so aspect ratio I have maintained here so that your UI will look proper here it is coming like this ok and here you have this sidebar now if you want to make some changes in sidebar then you can do it ok we have made a skeleton so this is done and here if you want some list item so You can replicate it like this. I can replicate it in some list item in this way. Something like this is coming and you want a button. I said no light mode or dark mode. So it was inside this. In the list itself, we have searched the list or something else. Search the list. And in the list, we took it from here. And in this, maybe one button, this one, this one, show code from here. And here we will copy a list item from here. Okay. And here we will just paste the list item below it. And list item button is here. Okay. So list item button is not to be used. Using it as a button means that nothing will come here. There will be some error because there will be no list item icon here. list item icon, this will be imported from the material UI and list item, we have to import this too from the material UI. Is there anything else? Go to the console in control shift type and see, list item is not defined, list item is not defined, list item should have been imported from the material UI, list item, okay, it has come from the material UI, great, is there anything else? Bluetooth icon is not defined. Bluetooth icon is not defined. Bluetooth icon is not defined. Bluetooth icon is not defined. Bluetooth icon is not defined. Bluetooth icon is not defined. according to the theme. So let's search the theme and copy this one here and paste it. So we will paste it here. Our import is done and we are going to use the same icon here. Come down a little and instead of the Bluetooth icon, we will use this icon. Is there any other problem with it? Let's see. Switch is not defined. So we will also have to order the switch from the material UI. Switch. And look carefully. It is not coming from MUI. It is coming from MUI. Alright. So it must have been imported. And see what the problem is. Handle toggle is not defined. Where is handle toggle? Where is handle toggle? This is handle toggle. Okay. Maybe there was a function of handle toggle here. We will have to see. Where did we get this from? From list. So come down a little bit, come down a little bit more and here. Handle toggle. Here is the handle toggle and this whole thing will have to be copied from here. And here we have to paste. Ok, so we have copied and pasted and react.useState and Wi-Fi here. Right now, Wi-Fi is using this state here, but it will work anyway. If you want, you can do it with Bluetooth. Bluetooth. Okay. And here, the value that is coming, that value is passing here. That means we have to come down here and change it a little bit. So these are all React talks. If you don't understand this, then it's wrong. Okay. Did we do Bluetooth? Here it will be dark mode, light mode. Let's make it mode. Okay. Mode. And or you can also do true or false as per your choice. You can see here, you can do whatever you want to do according to your choice, you can write mode or you can keep only true or false because you have to switch between light and dark mode. So you can keep true or false normal here. But they have made an array concept here, so you can also use the array concept. But I don't think there is a need to do such a long process here. You will make a state by using a normal reduction toolkit here, you will keep true or false value there for mode. and you can directly come here and apply. But for now it is using an array, so let's do it in the same way. So the mode value will be coming to you here. List item, okay, primary Bluetooth. Okay, what has this primary given? Let's remove it and see how it looks right now. Okay, you have normal text here, so I write mode here. Okay, so look, this is the mode and here the value has also been given in the handle toggle. So let's make it mode otherwise it will not work. So here you have to pass this mode because we have changed it here and here too. If the mode is included then it will be checked and if it is not included then it will be unchecked and we have put the mode in the handle toggle. So as soon as the mode goes here, this value will take the mode from here and this mode will be put in this array. So if it happens, it will be ticked, otherwise it will not happen. But there is no need to do such a long process, I don't think so. This is unnecessary here. If you want to change the mode, then the app is simple. You don't want to play here like a checkbox that multiple values ​ ​ will come to you here. Here you just have to keep the mode true false light mode. If the light mode is true, the light mode is false. Dark mode is dark mode true false. So according to that, you put logic here. This is a waste of logic. But it's okay, it's done. And here, look carefully, we are clicking on this one. So here this list is opening. This is happening because I can tell you the reason here. We have to follow the logic. We don't have to close our eyes and work here. See, there was a collapse here. This collapse. Here it is using the same state. This one. There is only one single state. And we have replicated the single state here. Basically, we just replicated it. We had copied and pasted it. So here it is using the same state. Because of which we are clicking on the upper one. So the lower one is opening. And here we have done nesting in the same place. Okay. So we don't have to do this. If you will replicate this again and again, then see here in this way. So whatever you are clicking, it is opening, it is opening. So don't do this here. Okay, remove this and this list button and this collapse are both together. Observe this carefully. Here on click on handle click and handle click you will come here. So see here handle click is implemented here in which the set is open. Okay, so these two are working together. So you can make a different state and take more separately. So, from here to here. So, let's write it like this. Nested list. Okay. So, this is one nested list. You can copy it here. Copy and paste. So this is the second nested list. But both of these will open. If you click on one, both will open. If you close, both will close. Because it is working in a single state. If you change the state, both will be different. In a single state, you can make an array and work on it. Which one should be open and which one should be closed. You can do it according to that. So logic is the whole work. So I will remove this. I was just telling you to explain. And above also, where we have used this one. List item. Inbox one. We will remove that. Inbox. Okay, inbox, where is it? See, there is a useless user here. There is nothing here about the collapse. We have only put handle click. So it will also move from here. This one is fine and now everything is fine and separate it a little bit so that everyone can know that this is a list. This is a list button, this is a list button, this is a list button and this whole one is not the only one here. Separate this one list button, this second one, then this is a nested list here, then this list item is our second. Why didn't we use the list button here? Why did we use the list item? Because there is such an effect in the button. So we don't want this effect. There is a simple button here, so that's why we used it normally here. Okay, so you will gradually understand things by looking at it. So, this is done. Very good. Now, let's make a feed section. And to make a feed section, what we have to do is, take a card from here. And the card is very beautiful here. It is a made-up card which I had seen. This one. So, we will take this card here. We will do show code. And from here, copy. And in components, one. We will make a feed card. Feed card.jsx And this is our feed card. You just have to copy and paste. Rest, when it comes to changes, you will be working with the database. So you have to change a little bit. Basically, your work will be done in the UI. So the card is done. And you have to come and put it in the feed. Sidebar work is done for the time being. Napbar is done. Main.jsx set out. Theme.jsx set out. Rightbar also set out. You have to work on feed. So here. Let's work on feed. Here basically this card. We have to put it this way and this is our multiple card and it was applied here, it did not happen. OK, our feed is running. We have put the feed here and we have put one card here for the time being. So I don't know why the card didn't come here. Remove the middle color for the time being. Now we know that it is so far away. And where is the card? Okay, this material is imported from the card. Okay, so you have to keep in mind where the import is happening. Card dot slash feed card. Import from dot slash feed card. Okay, so now it should be visible here. Yes, it is visible. Okay, so we will come inside this card. And everything is fine. What to do here is basically its width is fixed a little bit. So they have given the maximum width here, they will remove it from here. Okay, it will take the full width. And what do we have to do? And here somewhere the image is attached, media. Okay, so here we search the image according to ourselves. Image and put a beautiful image. Now the focus is only on making UI. Which one to put, what data to keep, there is no point in that. Put any beautiful one. Suppose I want to put this image, I will copy the image address from here and come here and come here. I will put the link given in this place here. Ok, so this image has been put here and what can we do? He has given the height, so let's remove the height, then the height of the entire image will be coming here and something like this is coming and we will do one thing, come to the feed, replicate the card and see how it is looking. So this is something like this. And in the card, we have to give a little margin bottom. Or can we use space here? No, no, no. So simply use SX. And here also, say, flex the display. Flex. And flex direction change will have to be done. Column, right? Okay. In row it will be like this, we will make a column. And what to do? And basically use the gap. Let's use the gap of 1rem. So here the gap will come in the middle. Okay. You can also give the gap of 2rem. 2rem will also look beautiful. See this. Great. So this is coming in this way for now. And it is looking beautiful too. And do one thing, this feed page. In this feed page, padding give me some padding from top bottom 1rem and rest 0 so something like this is coming and this background is coming from somewhere is there any shadow in sidebar we will have to see in sidebar in sidebar this background.paper and subheader The map bar is basically a list here. By default, there are some sides and sides in it. So you have to see this and remove it. Where is it coming from? It doesn't look that good. And one more thing will have to be done here by coming to the app.jsx. Here you give it a spacing of 10. So this is a lot of spacing. Actually, one is coming like this. Okay, for now, it's coming like this. Now let's focus a little on the right bar. How should our right bar look like? So what do you want to put in the right bar? Now see what kind of component you want to put here. For now, I haven't thought about what to do here. I had an idea of a feed that we will mention the feed here. You must be coming in this way in the sidebar. Here the navbar must be coming. What UI would you like to give in the right bar? Some images etc. Users etc. Multiple users. Which users are online or not. You can make that kind of design. Or you can also make masonry layout. Masonry layout. Okay. So this is looking better according to your project. We got this after searching a lot. We can show a user on the side. All the users and their chats etc. Some such type of interface. Rest according to the project. Whatever you will need. If you are working with database. So design that UI according to you. I am showing this for now. So we will copy it here and paste it in the right bar. And let's see how it is looking. So here it is looking something like this and it is looking much better. Okay, this is much better according to us. And we will have to wrap it in a box again. Box and we will come down here and put it quickly. kaafi lamba component hai. Thik hai. To form it and upar aake yahaan pe se It's a very long component. Okay, so format and come up here and give it flex1. So now it will be responsive and flex1 is looking a little weird. It should be 2 according to me. Okay, let's give flex2. So ratio of 1 is to 4 is to 2 has come here and it looks like this now. And we will do one thing to make it responsive. You can So you can hide it on some breakpoints. So how can you do that? You can search here breakpoints etc. What are the breakpoints mentioned here. You can also change the breakpoints according to your theme. So the axis is extra small here which is 0 pixel. Small is here 600 pixel. Medium is here 900 pixel. And for large devices 1200 pixel. And all these things are defined. Pixels etc. Breakpoints etc. You can mention according to you. Basically, you can define breakpoints by going to the theme. If you want to change it, then. Rest, for now, it's fine. So, what will I do? I will come here in feed. Not in feed. In sidebar first. So, here. So, in small devices, we want to do display none here. So, for this, we can do it very easily in material UI. Media query is very easy to write here. We will do it in the same way as we do in the normal style. And if you want to do the display in the key value pair, then you can do it in this way. So you will not be able to see it here, but we don't want that. We want you to see it in some device size and not in some device size. So I will make another object in this way and I will write in the key value pair. From small devices to large, whatever is the maximum size, its display has to be done. From small device to large device, display will be none. If we make it small, then display will be none. But we don't want this. We want display to be blocked from small to large device. So here you can see it from small to large. And as soon as it will be extra small, your display will not be none. Because you have to mention none for extra small. So we have mentioned none for extra small. That means from extra small to small your display will be none. After that from small to large your display will be blocked. If you don't mention extra small none here, that means your display will be blocked from small to large. And in previous, your default value will remain the same. So, there is no none in default. So, here you have to mention that you have to keep none in extra small. So, from extra small to small, your none will remain. Rest, from small to large device, your block will remain. So, here see, it is coming from small to large devices. Rest, as it will be extra small, your display will be none. Okay. Same to same, we will also do with right bar. And actually, if you do it with medium, then it will be better. From medium to large device, From medium to large devices. And as it will be small and extra small, it will be removed. Okay. And same to same, we will also put this in the right bar. Like this. So it will be much more responsive. So here you can't see it right now. The whole feed is coming in mobile only. And you can also make the map bar sticky if you want. It will look better. So come to the map bar quickly. And here is our main component. Here is the map bar. And in the map bar, come down a little. Here is the box. And here, make the position sticky. Okay. And For now, it won't work like this. Okay. So let's do one thing. Not in the map bar, so we can work by wrapping a div on it. Okay. Where did our app.jsx go? Here it is. So this is our map bar. Here is a div. Or if you want, you can also take a box here. If you want to take a box like this. And here, if you stick it, it should work now. position sticky, ok, so still it is not sticking, don't know why, from top to zero, ok, now it is sticking, so won't it do the same thing in the navbar, let's try it once, ok, you know sticky, it is very dependent on height, ok, and you have to give it in the outer component, if you give it in child, then maybe if it is not moving, then it will not stick, So, here it should work according to me. But once, let's try. Maybe at that time we didn't mention top. That's why it didn't work. Okay, it's working. And Z index, you mention here. Tan. So, it's properly sticky like this. Okay. And it's working great. If you want, you can make sidebar sticky too. In sidebar, there's a useless thing coming here. Which I want to remove. In sidebar, I don't want all these headers. So, I'll remove this. And this is something like this. So now our bar is sticky. If you want, you can also make the sidebar sticky here. Very easily. So here we come to the sidebar quickly. And there is no need to do much here. Just put the position sticky. And again from the top. Put 60 or 70. Because there will be some height of the navbar. So you will have to see accordingly. So now this sticky did not happen. Because maybe its display. This is not a display flex, basically we are using a flex box here. So if you make a box inside the box and make it sticky, then it should work. So let's make another box here. Okay, and cut it from here and paste it at the last. Okay, so we wrapped another box in the whole UI, in the sidebar UI. And here we will do this work. Position sticky. and from the top 70. So now see it is sticking. So I put it in the box. There is a box above it and there is a box inside the box. And I gave it sticky. So now it is properly stuck here. So now it is looking beautiful. And if you want, you can also increase the flex a little from 1 if it is not looking good. Rest, you can do more style according to you. So now it is looking beautiful and responsive completely. And actually, it is the same that you can see all three portions on the PC. If you have created a UI like this and the rest of the mobile will be hidden in two portions, the rest of the main portion in the middle will be visible to you. You can bring the sidebar like this by clicking here and you can show everything there. So this is your task and one simple UI I have made it for you and you must have practiced it a lot. So you have to do some more tasks here, enhance it a little more. And if you are actually working with the database, then it will be more fun. With the database or... Even if not with the database, we have to make our own Json format and properly think in the mind that we have to make this kind of project. If you work in that way, it will be more fun, which we will do in the future. Right now, I just had to focus on the material UI, I had to practice a little on it. That's why I made a simple design and showed you and actually it was not in my mind that this kind of thing has to be made. I was thinking of making a sidebar and a feed section. So this is the design we have made. And it is a very beautiful design actually. And it is made very quickly. Okay. If you are making it yourself, then it will be made faster. It took me a little time to explain. But you can make this whole design in 5-10 minutes and make it ready. It just takes a little time to debug it and change things. So... Let's leave this project for now. After that, some more portions are left in React. Let's complete it quickly. In the end, only our project will be left. Major project. We have done many small projects. Main projects, which you can add in resume. 2-3 such projects. And the interview, as I said, we will start that. And then we will see the rest. So, that's it for now. And we will meet in the next lecture. Till then, bye-bye.