solution • React MUI component library - martindubenet/wed-dev-design GitHub Wiki
[ React TypeScript coding ][ React JSX templates ][ React MUI component library ][ Gatsby.React on Netlify ]
mui.com — All components | My wiki about « MUI design system for Figma ».
Do not confuse with Google's Material.io. Material.io as it's own design system « Material 3 Design Kit for Figma » that does not exist as a React component library like MUI does.
React components and utilities, ready-to-use, free forever, and with accessibility always in mind. We've built the foundational UI blocks for your design system so you don't have to.
-
MUI System : MUI System is a set of CSS utilities to help you build custom designs more efficiently using React properties (
prop
). It makes it possible to rapidly lay out custom designs. - Base UI : Base UI gives you a set of foundational headless components that you can build with using any styling solution you choose — no need to override any default style engine or theme.
- Material UI : Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.
Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, Tree Views, etc.
Pick your favorite design tool to enjoy and use Material UI components. Boost consistency and facilitate communication when working with developers.
- MUI for Figma : A large UI kit with over 600 handcrafted MUI symbols for Figma.
Neutral grey[]
color variables are used eveywhere in the native library to render UI components. But instead of hacking the cascade of color variables it is safer (for maintenance) to target those main component colors.
color var | use it for | code example |
---|---|---|
divider | All the borders of the UI elements EXCEPT for the (form) inputs components | <Box sx={{ borderBottom: 1, borderColor: 'divider' }}><Tabs /></Box> |
<typography color="error">
<typography color={theme.primary.main}>
<typography sx={{ textShadow: `0 -1px 5px ${theme.palette.mode === 'light' ? '#0000001F' : '#00000080'}` }}>
By default...
-
spacing
calculation units are incremented by 8 :theme.spacing(2); //
,${8 * 2}px
= '16px' -
spacing
units are rem values based on the<body>
's font-size of16px
.
<Box padding={2}>
<Box style={{ padding: theme.spacing(2) }}>
<Box sx={{ padding: '16px' }}>
<Box sx={{ padding: 2 }}>
<Box sx={{ padding: constConditionExample ? 0 : theme.spacing(2) }}>
<Box sx={{ backgroundColor: theme.elevation[1] }}
spacing | rem | pixels |
---|---|---|
0.5 | 0.25rem | 4px |
1 | 0.5rem | 8px |
2 | 1rem | 16px |
3 | 1.5rem | 24px |
4 | 2rem | 32px |
5 | 2.5rem | 40px |
6 | 3rem | 48px |
7 | 3.5rem | 56px |
7 | 3.5rem | 56px |
import Delete as DeleteIcon from '@mui/icons-material';
export default function SvgMaterialIcons() {
return (
<DeleteIcon />
<IconButton onClick={onClose} titleAccess="Close">
<DeleteIcon />
</IconButton>
);
}
- Design your vectorial illutration using the InkScape app
- Learn how to code your illustration as an SVG file
- Learn how to code your SVG file as an MUI SvgIcon component
<SvgIcon htmlColor={theme.primary[400]} fontSize="small">
<MyCustomIcon />
</SvgIcon>
MUI Dialogs maxWidth
prop dimensions
Gutters (
margin
) value is always32px
all around.
Vars | Max-width dimensions |
---|---|
false |
100% |
xs |
444px |
sm |
600px |
md |
900px |
lg |
1200px |
xl |
1536px |