An Image List consists of several items, each containing an image and optionally supporting a text label.
Note that you will have to set the width and margin of image list items yourself, preferably through SASS.
import Html.Attributes exposing (style)
import Material.ImageList
exposing
( imageList
, imageListConfig
, imageListItem
, imageListItemConfig
)
main =
imageList imageListConfig
[ imageListItem
{ imageListItemConfig
| additionalAttributes =
[ style "width"
"calc(100% / 5 - 4.2px)"
, style "margin" "2px"
]
}
"images/photos/3x2/1.jpg"
]Default configuration of an image list
Configuration of an image list
Image list item constructor
Default configuration of an image list item
Configuration of an image list item
Image list item
The Masonry Image List variant presents images vertically arranged into several columns, using CSS Columns. In this layout, images may be any combination of aspect ratios.
imageList { imageListConfig | masonry = True } []Image's labels are by default positioned below the image. If you want image labels to be positioned in a scrim overlaying each image, set the image list's textProtection configuration field to True.
imageList { imageListConfig | textProtection = True }
[ imageListItem
{ imageListItemConfig | label = "Photo" }
"images/photos/3x2/1.jpg"
]
Image list view function