Image list 图像列表
图像列表在一个系统的栅格中展示了一系列的图像。
图像列表表示重复模式的项目集合。 它们有助于提高对所持内容的视觉理解。
<ImageList sx={{ width: 500, height: 450 }} cols={3} rowHeight={164}>
{itemData.map((item) => (
<ImageListItem key={item.img}>
<img
src={`${item.img}?w=164&h=164&fit=crop&auto=format`}
srcSet={`${item.img}?w=164&h=164&fit=crop&auto=format&dpr=2 2x`}
alt={item.title}
loading="lazy"
/>
</ImageListItem>
))}
</ImageList>
<ImageList
sx={{ width: 500, height: 450 }}
variant="quilted"
cols={4}
rowHeight={121}
>
{itemData.map((item) => (
<ImageListItem key={item.img} cols={item.cols || 1} rows={item.rows || 1}>
<img
{...srcset(item.img, 121, item.rows, item.cols)}
alt={item.title}
loading="lazy"
/>
</ImageListItem>
))}
</ImageList>
<ImageList sx={{ width: 500, height: 450 }} variant="woven" cols={3} gap={8}>
{itemData.map((item) => (
<ImageListItem key={item.img}>
<img
src={`${item.img}?w=161&fit=crop&auto=format`}
srcSet={`${item.img}?w=161&fit=crop&auto=format&dpr=2 2x`}
alt={item.title}
loading="lazy"
/>
</ImageListItem>
))}
</ImageList>
<ImageList variant="masonry" cols={3} gap={8}>
{itemData.map((item) => (
<ImageListItem key={item.img}>
<img
src={`${item.img}?w=248&fit=crop&auto=format`}
srcSet={`${item.img}?w=248&fit=crop&auto=format&dpr=2 2x`}
alt={item.title}
loading="lazy"
/>
</ImageListItem>
))}
</ImageList>
- December
- Breakfast@bkristastucchio
- Burger@rollelflex_graphy726
- Camera@helloimnik
- Coffee@nolanissac
- Hats@hjrc33
- Honey@arwinneil
- Basketball@tjdragotta
- Fern@katie_wasserman
- Mushrooms@silverdalex
- Tomato basil@shelleypauls
- Sea star@peterlaster
- Bike@southside_customs
- Breakfastby: @bkristastucchio
- Burgerby: @rollelflex_graphy726
- Cameraby: @helloimnik
- Coffeeby: @nolanissac
- Hatsby: @hjrc33
- Honeyby: @arwinneil
- Basketballby: @tjdragotta
- Fernby: @katie_wasserman
- Mushroomsby: @silverdalex
- Tomato basilby: @shelleypauls
- Sea starby: @peterlaster
- Bikeby: @southside_customs
- swabdesign
- Pavel Nekoranec
- Charles Deluvio
- Christian Mackie
- Darren Richardson
- Taylor Simpson
- Ben Kolde
- Philipp Berndt
- Jen P.
- Douglas Sheppard
- Fi Bell
- Hutomo Abrianto
<ImageList variant="masonry" cols={3} gap={8}>
{itemData.map((item) => (
<ImageListItem key={item.img}>
<img
src={`${item.img}?w=248&fit=crop&auto=format`}
srcSet={`${item.img}?w=248&fit=crop&auto=format&dpr=2 2x`}
alt={item.title}
loading="lazy"
/>
<ImageListItemBar position="below" title={item.author} />
</ImageListItem>
))}
</ImageList>
自定义图像列表
在这个例子中,项目有一个自定义的标题栏,位于顶部,并有一个自定义渐变的 titleBackground
。 而辅助操作的 IconButton
则位于左侧。 gap
属性用于调整项目之间的间隙。
- Breakfast
- Burger
- Camera
- Coffee
- Hats
- Honey
- Basketball
- Fern
- Mushrooms
- Tomato basil
- Sea star
- Bike