Material UI
MUI offers a comprehensive suite of UI tools to help you ship new features faster. Start with Material UI, our fully-loaded component library, or bring your own design system to our production-ready components.
Categories
- MUI X
- MUI X - MUI X is a collection of advanced React UI components for complex use cases.
- Material Icons
- Material Icons - Material UI - 아이콘 목록 브라우징 할 수 있는 사이트
- Mui:ButtonBase
- Mui:TouchRipple - Ripple effect 지원 방법.
Components
Chip
주의사항은 저기의 color
에 색상코드를 입력할 수 없다. 저건 테마의 팔레트 명이다. 생상코드를 입력하고 싶다면 다음과 같이 입력해야 한다.
Icons
Material Design Icon
사용 방법은 다음과 같다:
import CheckBoxOutlineBlank from '@mui/icons-material/CheckBoxOutlineBlank';
// ...
<CheckBoxOutlineBlank />;
TextField
비밀번호 출력:
<TextField ref={x => this.password = x}
hintText="Password"
floatingLabelText="Password"
type="password">
</TextField>
Custom Item
import * as React from 'react';
import Box from '@mui/material/Box';
import Grid from '@mui/material/Unstable_Grid2';
import {styled} from '@mui/material/styles';
import Paper from '@mui/material/Paper';
const Item = styled(Paper)(({theme}) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.palette.text.secondary,
}));
export default function Search() {
return (
<div>
<Box sx={{marginTop: 2, marginLeft: 2, marginRight: 2}}>
<Grid container spacing={2}>
<Grid xs={3}>
<Item>item</Item>
</Grid>
</Grid>
</Box>
</div>
);
}
Troubleshooting
The page size n
is not preset in the xxx
Add it to show the pagination select
MUI: The page size `100` is not preset in the `rowsPerPageOptions` Add it to show the pagination select.