An Elm Scroll package with not ports
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
src
.gitignore
README.md
documentation.json
elm-package.json
index.html

README.md

elm-scroll

An Elm Scroll package with no ports.

Note: This is a rough, rough prototype. I hacked this together on a flight in less than three hours.

How to use

  1. Add a subscription to the scroll function:
main =
    Html.program { view = view, update = update, init = init, subscriptions = subscriptions }


subscriptions : Model -> Sub Msg
subscriptions model =
    scroll ScrollEvent 
  1. Create a message that takes a Position type:
    = NoOp
    | ScrollEvent Position 

I am looking for feedback. Again, this is a rough prototype and there are lots of improvements to be made.