hallelujahdrive / elm-accordion / Accordion

Basic Usage

import Accordion

type alias Model =
    Bool

type Msg
    = HeadClicked

view model =
    Accordion.accordion
        (Accordion.head
            [ onClick HeadClicked ]
            headChildren
        )
        (Accordion.body
            []
            bodyChildren
        )
        model

uodate msg model =
    case msg of
        HeadClicked ->
            ( not model
            , Cmd.none
            )

Accodion

accordion : List (Html.Attribute msg) -> Head msg -> Body msg -> Basics.Bool -> Html msg

Accordion view function

Accordion head


type alias Head msg =
Internal.Head msg

Accordion head type

head : List (Html.Attribute msg) -> List (Html msg) -> Head msg

Accordion head constructor

Accordion body


type alias Body msg =
Internal.Body msg

Accordion body type

body : List (Html.Attribute msg) -> List (Html msg) -> Body msg

Accordion body constructor

List of Accordions