block by mgold eafae5e645f34f5196d7

Toggle in Elm

#Toggling Presidents in Elm

from Max Goldstein

This is a simple website in Elm to demonstrate a toggle component. The reusable component is visually attractive and can be customized to a small amount (but a larger API can expand that). The toggle does not require explicit state in the model, and it animates without being passed the current time. However, it very hackily inserts a style tag within the body of the bag.

elm package install --yes
elm reactor

Open Main.elm

Main.elm

President.elm

Toggle.elm

elm-package.json

presidents.json