跳转到内容

ImageListItemBar API

想要学习更多组件属性和 CSS API,可以查阅 React ImageListItemBar 组件的 API 文档。

演示项目

For examples and details on the usage of this React component, visit the component demo pages:

导入

import ImageListItemBar from '@mui/material/ImageListItemBar';
// 或
import { ImageListItemBar } from '@mui/material';
你可以阅读这个关于最小化捆绑包的指南以了解以上二者的差异。

组件名称

在主题中,名称“MuiImageListItemBar”可用于提供默认属性(props),或者样式覆盖

属性

原生(Native) 组件的属性也是可用的。

名称类型默认值描述
actionIconnode
An IconButton element to be used as secondary action target (primary action target is the item itself).
actionPosition'left'
| 'right'
'right'
Position of secondary action IconButton.
classesobject
Override or extend the styles applied to the component. See CSS API below for more details.
position'below'
| 'bottom'
| 'top'
'bottom'
标题栏的位置
subtitlenode
String or element serving as subtitle (support text).
sxArray<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.
titlenode
要显示的标题

ref 则会被传递到根元素中。

CSS

规则名称全局类名描述
root.MuiImageListItemBar-rootStyles applied to the root element.
positionBottom.MuiImageListItemBar-positionBottomStyles applied to the root element if position="bottom".
positionTop.MuiImageListItemBar-positionTopStyles applied to the root element if position="top".
positionBelow.MuiImageListItemBar-positionBelowStyles applied to the root element if position="below".
titleWrap.MuiImageListItemBar-titleWrapStyles applied to the title and subtitle container element.
titleWrapBelow.MuiImageListItemBar-titleWrapBelowStyles applied to the title and subtitle container element if position="below".
titleWrapActionPosLeft.MuiImageListItemBar-titleWrapActionPosLeftStyles applied to the container element if actionPosition="left".
titleWrapActionPosRight.MuiImageListItemBar-titleWrapActionPosRightStyles applied to the container element if actionPosition="right".
title.MuiImageListItemBar-titleStyles applied to 标题的容器元素.
subtitle.MuiImageListItemBar-subtitleStyles applied to 二级标题的容器元素.
actionIcon.MuiImageListItemBar-actionIconStyles applied to the actionIcon if supplied.
actionIconActionPosLeft.MuiImageListItemBar-actionIconActionPosLeftStyles applied to the actionIcon if actionPosition="left".

您可以使用组件自定义选项对组件进行个性化: