UI.ContentPlaceholders fills space in an area that is waiting for some action from the user.
An content-placeholder can be created and rendered as in the following pipeline:
ContentPlaceholders.custom
{ icon = Icon.fix
, title = "Select A Group"
, body = "Please select a group to fix from the list on the left."
}
|> ContentPlaceholders.withSize Size.large
|> ContentPlaceholders.renderElement renderConfigThere are also some ready-to-use costructors.
Constructs a generic ContentPlaceholder.
ContentPlaceholders.custom
{ icon = Icon.download
, title = "Pick a file"
, body = "Please select a file to download it."
}
|> ContentPlaceholders.renderElement renderConfigOne of the ready-to-use constructors. Used in impossible-states and empty unmanaged lists.
ContentPlaceholders.nothingToSeeHere
|> ContentPlaceholders.renderElement renderConfigWith withLargeSize, you'll have a larger ContentPlaceholder.
ContentPlaceholders.withLargeSize somePlaceholderNOTE: Default size is Size.medium.
End of the builder's life. The result of component function is a ready-to-insert Elm UI's Element.
The
ContentPlaceholdertype is used for describing the component for later rendering.