Material UI is an open-source React component library that implements Google’s Material Design.
It includes a comprehensive collection of prebuilt components that are ready for use in production right out of the box and features a suite of customization options that make it easy to implement your own custom design system on top of our components.
MUI gives you prebuilt components (e.g. Button, Dialog, Snackbar, Autocomplete, Tooltip, Drawer, AppBar, etc.)
All styled and responsive out-of-the-box, with accessibility and keyboard support
Built-in theming
Define brand colors, fonts, spacing once in theme.ts
import * as React from 'react';import Button from '@mui/material/Button';export default function ButtonUsage() { return <Button variant="contained">Hello world</Button>;}
Theming
Default Theme
Shows how the theme object looks like with the default values
This component takes a theme prop and applies it to the entire React tree that it is wrapping around. It should preferably be used at the root of your component tree.
The sx prop is the best option for adding style overrides to a single instance of a component in most cases. It can be used with all Material UI components.
In Material Design, surface components and shadow styles are heavily influenced by their real-world physical counterparts.
Material UI implements this concept with the Paper component, a container-like surface that features the elevation prop for pulling box-shadow values from the theme.
MUI Tutorial #2
Component
Role
<Box>
A generic, highly flexible layout wrapper (like a styled <div>). Great for setting background color, centering, flex layout, full-page height, etc.
<Container>
A content wrapper that limits the width (e.g., to 600px or 960px) and adds horizontal padding. It helps keep your content from stretching edge-to-edge on wide screens.
Modal Demo
A side-by-side comparison of creating a button that opens a modal