accordion library
Copyright 2021-2022 Christian Gotschim.
Published under the new BSD license.
Simple to use accordion widget with lots of preset properties.
Use the maxOpenSections
property to automatically close sections
when opening a new section. This is especially helpful if you
always want your list to look clean -- just set this parameter
to 1 and whenever you open a new section the previous one closes.
scrollIntoView
paramter can be set to fast
, slow
, or none
.
This parameter will only take affect if there are enough items in
the list so scrolling is feasible.
Many parameters can be set globally on Accordion
as well as individually
on each AccordionSection
(see list below).
The header consists of the left and right icons (right icon is preset
to arrow down). Both can be set globally and individually. The
header
parameter is required and needs to be set for each
AccordionSection
.
headerText
, headerTextAlign
, headerTextStyle
have been
deprecated as of version 2.0 and should be replaced with header
The content area basically provides the container in which you drop
whatever you want to display when AccordionSection
opens. Background
and borders can be set globally or individually per section.
Classes
- Accordion
- The container list for all accordion sections.
- AccordionSection
-
AccordionSection
is one section within theAccordion
widget. Usage: