hallelujahdrive/elm-accordion/1.0.0

NOTE: the latest version is 1.0.4

Accordion

Basic Usage

import Accordion


type alias Model =
    Bool


type Msg
    = HeadClicked


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


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

Accodion

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

Accordion view function

  • attributes List of attributes
  • head An accordion head element
  • body An accordion body element
  • open Specify whether a dailog is open

Accordion head

Accordion body

type alias Body msg =
Body msg

Accordion body type

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

Accordion body constructor

  • attributes List of attributes
  • children List of child elements

List of Accordions