Material UI (MUI) Install
Basic libraries
@emotion/styled
@emotion/react
@mui/material
I needed 3 libraries to use material UI.
@mul/material
includes bunch of MUI components.
emotion
supports customized React components and MUI uses emotion
s components.
That's why I needed to install emotion libraries to use MUI components.
How to import components from MUI then?
import {Typography} from '@mui/material'
There's one more thing.
MUI icons
To use Icons, I needed to install this library.
@mui/icons-material
How to import icons from the library
import {SendIcon} from '@mui/icons-material'
import SendIcon from '@mui/icons-material/Send'
Check the full list of MUI icons here!
https://mui.com/components/material-icons/
Check the list of MUI components here!
https://mui.com/material-ui/getting-started/supported-components/#main-content
A code example
import {Button} from '@mui/material'
import SendIcon from '@mui/icons-material/Send'
export default function App() {
return (
<Button
startIcon={<SendIcon/>
}>
Button
</Button>
)
}
Top comments (0)