NoRedInk/noredink-ui/9.5.2

NOTE: the latest version is 35.9.3

Nri.Ui.Confetti.V1

type Model
init : Float -> Model
view : Model -> Html msg
type alias Msg =
Msg Confetti
List
{ color : Color
, text : String
}
-> Model
-> Model

burst BURSTS CONFETTI!!! Pass in a list of words that you'd like to have in the confetti:

Confetti.burst
    [ { color = Colors.highlightMagenta, text = "tree" }
    , { color = Colors.highlightGreen, text = "bush" }
    , { color = Colors.highlightCyan, text = "succulent" }
    ]
    state.confetti
update : Msg Confetti -> Model -> Model

You will need to watch for page resize events and update the confetti model with the new width. If you don't, your confetti will be off-center.

Why is this not part of subscriptions? Your application may already be listening for browser resize events -- we don't want to double-up listeners unnecessarily.

subscriptions : (Msg -> msg) -> Model -> Sub msg