CardHeader API
Importação
import CardHeader from '@mui/material/CardHeader';
// ou
import { CardHeader } from '@mui/material';Nome do componente
The nameMuiCardHeader 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 |
|---|---|---|---|
| action | node | The action to display in the card header. | |
| avatar | node | The Avatar for the Card Header. | |
| 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. | |
| disableTypography | bool | false | If true, subheader and title won't be wrapped by a Typography component. This can be useful to render an alternative Typography variant by wrapping the title text, and optional subheader text with the Typography component. |
| subheader | node | O conteúdo do componente. | |
| subheaderTypographyProps | object | These props will be forwarded to the subheader (as long as disableTypography is not true). | |
| 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. | |
| title | node | O conteúdo do componente. | |
| titleTypographyProps | object | These props will be forwarded to the title (as long as disableTypography is not true). |
O
ref é encaminhado para o elemento raiz.CSS
| Nome da regra | Classe global | Descrição |
|---|---|---|
| root | .MuiCardHeader-root | Estilos aplicados ao elemento raiz. |
| avatar | .MuiCardHeader-avatar | Estilos aplicados a the avatar element. |
| action | .MuiCardHeader-action | Estilos aplicados a the action element. |
| content | .MuiCardHeader-content | Estilos aplicados a the content wrapper element. |
| title | .MuiCardHeader-title | Estilos aplicados a the title Typography element. |
| subheader | .MuiCardHeader-subheader | Estilos aplicados a the subheader Typography element. |
Você pode sobrescrever o estilo do componente usando uma dessas opções de customização:
- With a global class name.
- With a rule name as part of the component's
styleOverridesproperty in a custom theme.