TableCell
The API documentation of the TableCell React component.
Props
Name | Type | Default | Description |
---|---|---|---|
children | node | The table cell contents. | |
classes | object | Override or extend the styles applied to the component. See CSS API below for more details. | |
component | union: string | func | object |
The component used for the root node. Either a string to use a DOM element or a component. | |
numeric | bool | false | If true , content will align to the right. |
padding | enum: 'default' | 'checkbox' | 'dense' | 'none' |
Sets the padding applied to the cell. By default, the Table parent component set the value. | |
scope | string | Set scope attribute. | |
sortDirection | enum: 'asc' | 'desc' | false |
Set aria-sort direction. | |
variant | enum: 'head' | 'body' | 'footer' |
Specify the cell type. By default, the TableHead, TableBody or TableFooter parent component set the value. |
Any other properties supplied will be spread to the root element (native element).
CSS API
You can override all the class names injected by Material-UI thanks to the classes
property.
This property accepts the following keys:
Name | Description |
---|---|
root | Styles applied to the root element. |
head | Styles applied to the root element if variant="head" or context.table.head . |
body | Styles applied to the root element if variant="body" or context.table.body . |
footer | Styles applied to the root element if variant="footer" or context.table.footer . |
numeric | Styles applied to the root element if numeric={true} . |
paddingDense | Styles applied to the root element if padding="dense" . |
paddingCheckbox | Styles applied to the root element if padding="checkbox" . |
paddingNone | Styles applied to the root element if padding="none" . |
Have a look at overriding with classes section and the implementation of the component for more detail.
If using the overrides
key of the theme as documented
here,
you need to use the following style sheet name: MuiTableCell
.