Utility functions for conditionally rendering HTML elements in Elm applications.
This package provides helper functions that make it easier to:
contentListlazyContentListMaybe values with maybeContentListwrapToSingleNodenothing functionelm install cekrem/html-helpersimport HtmlHelpers exposing (contentList, lazyContentList, maybeContentList, wrapToSingleNode, nothing)
-- Conditionally render elements based on boolean flags
view =
contentList
[ ( Html.text "Always visible", True )
, ( Html.text "Conditionally visible", model.isVisible )
]
-- See the module documentation for more examplesFor complete documentation, see the Elm package documentation.
Feedback, bug reports, and contributions are welcome! Please feel free to open an issue or submit a pull request.
BSD-3-Clause