Create beautiful examples to show off your Elm packages and projects.
{ title : String
, details : Maybe String
, color : Maybe Color
, maxWidth : Basics.Int
, githubUrl : Maybe String
, documentationUrl : Maybe String
}
Configuration for BeautifulExample.view
Nothing
)sandbox : Config -> { init : model, view : model -> Html msg, update : msg -> model -> model } -> Platform.Program () model msg
Turn a Browser.sandbox
into a beautiful example
element : Config -> { init : flags -> ( model, Platform.Cmd.Cmd msg ), view : model -> Html msg, update : msg -> model -> ( model, Platform.Cmd.Cmd msg ), subscriptions : model -> Platform.Sub.Sub msg } -> Platform.Program flags model msg
Turn a Browser.element
into a beautiful example
document : Config -> { init : flags -> ( model, Platform.Cmd.Cmd msg ), view : model -> Browser.Document msg, update : msg -> model -> ( model, Platform.Cmd.Cmd msg ), subscriptions : model -> Platform.Sub.Sub msg } -> Platform.Program flags model msg
Turn a Browser.document
into a beautiful example
application : Config -> { init : flags -> Url -> Browser.Navigation.Key -> ( model, Platform.Cmd.Cmd msg ), view : model -> Browser.Document msg, update : msg -> model -> ( model, Platform.Cmd.Cmd msg ), subscriptions : model -> Platform.Sub.Sub msg, onUrlRequest : Browser.UrlRequest -> msg, onUrlChange : Url -> msg } -> Platform.Program flags model msg
Turn a Browser.application
into a beautiful example
view : Config -> Html msg -> Html msg
Turn arbitrary Html into a beautiful example.
Typically, you will want to use program
or beginnerProgram
instead.