Table API
Documentação da API para o componente React Table . Aprenda sobre as propriedades disponíveis e a API CSS.
Importação
import Table from '@mui/material/Table';
// ou
import { Table } from '@mui/material';Nome do componente
The nameMuiTable can be used when providing default props or style overrides in the theme.Propriedades
Propriedades do componente nativo também estão disponíveis.
| Nome | Tipo | Padrão | Descrição |
|---|---|---|---|
| children | node | The content of the table, normally TableHead and TableBody. | |
| classes | object | Sobrescreve ou extende os estilos aplicados para o componente. Veja a API CSS abaixo para maiores detalhes. | |
| component | elementType | The component used for the root node. Either a string to use a HTML element or a component. | |
| padding | 'checkbox' | 'none' | 'normal' | 'normal' | Allows TableCells to inherit padding of the Table. |
| size | 'medium' | 'small' | string | 'medium' | Allows TableCells to inherit size of the Table. |
| stickyHeader | bool | false | Set the header sticky. ⚠️ It doesn't work with IE11. |
| sx | Array<func | object | bool> | func | object | The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details. |
O
ref é encaminhado para o elemento raiz.CSS
| Nome da regra | Classe global | Descrição |
|---|---|---|
| root | .MuiTable-root | Estilos aplicados ao elemento raiz. |
| stickyHeader | .MuiTable-stickyHeader | Estilos aplicados para o elemento raiz se stickyHeader={true}. |
Você pode sobrescrever o estilo do componente usando uma dessas opções de customização:
- Com um nome de classe global.
- Com um nome de regra como parte da propriedade
styleOverridesdo componente em um tema personalizado.