uncover-co/elm-widgets/2.14.2

NOTE: the latest version is 2.28.0

W.Modal

List (Attribute msg)
-> { isOpen : Bool
, onClose : Maybe msg
, content : List (Html msg)
}
-> Html msg

Togglable

If you don't want to manage your modal open state at all, use the toggable version.

W.Modal.viewToggable []
    { id = "toggable-modal"
    , content = [ text "Hello!" ]
    }


W.Modal.viewToggle "toggable-modal"
    [ W.Button.viewDummy []
        [ text "Click here to toggle modal" ]
    ]
viewToggle : String -> List (Html msg) -> Html msg
List (Attribute msg)
-> { id : String
, content : List (Html msg)
}
-> Html msg
List (Attribute msg)
-> { id : String
, content : List (Html msg)
}
-> Html msg

Styles

maxWidth : Int -> Attribute msg
zIndex : Int -> Attribute msg

Html

htmlAttrs : List (Attribute msg) -> Attribute msg

Attributes applied to the modal's content wrapper.

type Attribute msg