Why not use one of the several other UI viewing packages like alexkorban/uicards
, kalutheo/elm-ui-explorer
, miyamoen/bibliopola
, and owanturist/elm-bulletproof
?
Most of these packages don't support interacting with UI beyond adding extra buttons to toggle the UIs appearance.
An exception is alexkorban/uicards
but it requires that all your UIs have the same msg and model type.
Here's a small example app with 3 pages. The first two pages show static content and the last page is interactive. To get it working, swap out "MyCoolUi" with whatever you want to show.
import MyCoolUi
import UiExplorer
pages =
UiExplorer.firstPage
"Button"
(UiExplorer.static MyCoolUi.button)
|> UiExplorer.nextPage
"Footer"
(UiExplorer.static MyCoolUi.footer)
|> UiExplorer.nextPage
"Login Form"
{ init = MyCoolUi.loginInit
, update = MyCoolUi.loginUpdate
, view =
\pageSize model -> MyCoolUi.loginView model
, subscriptions = always Sub.none
}
main =
UiExplorer.application UiExplorer.defaultConfig pages
For a real world use case here's how we use it at Insurello (the code can be found here).