perzanko/elm-loading/2.0.0

NOTE: the latest version is 2.0.5

Loading

Config

type alias Config =
{ size : Float
, color : String
, className : String
, speed : Float
}

Loader types

You can choose one of these loaders:

= DoubleBounce
| Spinner
| BouncingBalls
| Bars
| Circle
| Sonar

Loading states

The loaders will be rendered according on the LoadingState. If you pass Loading.On loader will be displayed, if Loading.Off loader will be hidden (will not be hidden by css, only node will be removed).

= On
| Off

Default config

defaultConfig : Config

Render loader

Loading.render takes 3 arguments: LoaderType, Config, LoadingState.

render : LoaderType -> Config -> LoadingState -> Html a
view : Model -> Html Msg
view model =
    div []
        [ Loading.render
            DoubleBounce
            { defaultConfig | color = "#333" }
            Loading.On
        ]