Represents the static configuration of the component. Values passed in are no more modified by the setter.
Internal. Represents the state of the component. Values passed in are susceptible to change.
base : String -> (String -> Basics.Bool -> msg) -> Config msg
Returns the configuration for a Base accordion skin.
...
type alias Slug =
String
type Msg =
Toggled Slug Bool
...
myAccordionConfig : Accordion
myAccordionConfig =
Accordion.base "my_accordion_slug" Toggled
render : Html Msg
render =
Accordion.render myAccordionConfig
...
light : String -> (String -> Basics.Bool -> msg) -> Config msg
The same as base but with a Light skin.
dark : String -> (String -> Basics.Bool -> msg) -> Config msg
The same as base but with a Dark skin.
state : Basics.Bool -> State
Returns the basic state of the component.
open : State
Opens the Accordion to reveal it's content.
updatedAccordionState =
Accordion.open myAccordionState
close : State
Closes the Accordion to hide it's content.
updatedAccordionState =
Accordion.close myAccordionState
render : State -> Config msg -> Html msg
Renders the Accordion
.
renderGroup : List ( State, Config msg ) -> Html msg
Renders a group of Accordion(s) inside an AccordionGroup.
withAttribute : Html.Attribute msg -> Config msg -> Config msg
Adds a generic Html.Attribute to the Accordion
.
withWrapperClass : String -> Config msg -> Config msg
Adds a class for the wrapper to the Accordion
.
withContentClass : String -> Config msg -> Config msg
Adds a class for the content to the Accordion
.
withSimpleTitle : String -> Config msg -> Config msg
Adds a string title to the Accordion
.
withHtmlTitle : Html msg -> Config msg -> Config msg
Adds an Html title to the Accordion
.
withContent : List (Html msg) -> Config msg -> Config msg
Adds content to the Accordion