uncover-co / elm-widgets / W.Modal

view : List (Attribute msg) -> { isOpen : Basics.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

viewToggable : List (Attribute msg) -> { id : String, content : List (Html msg) } -> Html msg

viewToggableWithAutoClose : List (Attribute msg) -> { id : String, content : List (Html msg) } -> Html msg

Styles

absolute : Attribute msg

maxWidth : Basics.Int -> Attribute msg

noBlur : Attribute msg

zIndex : Basics.Int -> Attribute msg

Html

htmlAttrs : List (Html.Attribute msg) -> Attribute msg

Attributes applied to the modal's content wrapper.

noAttr : Attribute msg


type Attribute msg