Getting Started
Learn how to install and use MUI System in your project.Installation
Install MUI System from npm:Peer Dependencies
MUI System requires the following peer dependencies:react>= 17.0.0@emotion/react>= 11.0.0@emotion/styled>= 11.0.0
Basic Usage
Using the Box Component
The simplest way to get started is with theBox component:
Using Style Props
You can also use system props directly:Setting Up a Theme
Create a custom theme to define your design tokens:Using styled()
Create custom styled components with thestyled() API:
Responsive Design
Use arrays or objects for responsive values:TypeScript
MUI System is written in TypeScript and provides full type safety:Extending the Theme Type
To add custom properties to the theme:Importing Style Functions
You can import individual style functions for use in custom components:Available Style Functions
MUI System provides the following style function groups:- borders - Border utilities (border, borderRadius, etc.)
- display - Display utilities (display, overflow, etc.)
- flexbox - Flexbox utilities (flexDirection, justifyContent, etc.)
- grid - CSS Grid utilities (gap, gridColumn, etc.)
- palette - Color utilities (color, bgcolor)
- positions - Position utilities (position, top, left, etc.)
- shadows - Shadow utilities (boxShadow)
- sizing - Sizing utilities (width, height, etc.)
- spacing - Spacing utilities (margin, padding)
- typography - Typography utilities (fontSize, fontWeight, etc.)
Next Steps
- The sx Prop - Learn about the powerful
sxprop - styled() API - Create custom styled components
- Box Component - Master the Box component
- Spacing - Understand the spacing system