fabiommendes / elm-daisy-ui / Daisy.Actions

Components in the DaisyUI Actions section

Button

See also: https://daisyui.com/components/button/

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

A simple button

Swap

See also: https://daisyui.com/components/swap/

swap : (Basics.Bool -> msg) -> List (Html.Attribute msg) -> Html msg -> Html msg -> Html msg

Swap allows you to toggle the visibility of two elements.

swapActive : Html.Attribute msg

Attribute to turn the swap on by default

swapFlip : Html.Attribute msg

Adds flip effect to swap

swapRotate : Html.Attribute msg

Adds rotate effect to swap

Modal

See also: https://daisyui.com/components/modal/#

modal : String -> List (Html.Attribute msg) -> List (Html msg) -> Html msg

Content of your modal dialog. It should be placed at the end of the HTML document

openModal : String -> List (Html.Attribute msg) -> List (Html msg) -> Html msg

A button that lives in your main document used to open the modal

closeModal : String -> List (Html.Attribute msg) -> List (Html msg) -> Html msg

A button that lives in the modal used to close it.

Dropdown

See also: https://daisyui.com/components/dropdown/#


type Dropdown
    = End
    | Top
    | Bottom
    | Left
    | Right
    | Hover
    | Open

Enumerate the drowpdown aligments

alignTo : Dropdown -> Html.Attribute msg

Attribute that defines the aligment of dropdown

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

The outer layer of a dropdown. It defines the label used to toggle it.

Content can be created by the auxiliary functions dropdownMenu, dropdownCard, dropdownData

dropdown [ alignTo End ]
    [ dropdownButton [ color primary ] [ text "open" ]
    , dropdownMenu [] [ text "Item 1", text "Item 2" ]
    ]

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

Button that triggers the dropdown

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

Contents for a dropdown card

dropdownData : Types.Element msg -> List (Html.Attribute msg) -> List (Html msg) -> Html msg

Contents for arbitrary dropdown content

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

Contents for a dropdown menu