lenards/elm-ui-patternfly/3.0.0

NOTE: the latest version is 4.0.2

PF6.Accordion

PF6 Accordion component

Accordions toggle the visibility of sections of content.

See: https://www.patternfly.org/components/accordion

Definition

type Accordion msg

Opaque Accordion type

type AccordionItem msg

A single accordion item

Constructor

accordion : List (AccordionItem msg) -> Accordion msg

Construct an Accordion from a list of items

Item constructor

{ title : String
, body : Element msg
, isExpanded : Bool
, onToggle : Bool -> msg
}

Construct an AccordionItem

item
    { title = "What is PatternFly?"
    , body = Element.text "PatternFly is..."
    , isExpanded = model.expanded == "pf"
    , onToggle = \open -> SetExpanded (if open then "pf" else "")
    }

Variant modifiers

Add borders between items

Larger heading text

Fixed height accordion (overflow scrolls)

Rendering

toMarkup : Accordion msg -> Element msg

Render the Accordion as an Element msg