1

Is it possible to close an accordion section kinda like a expandable section or do i have only the option to swap between them

edit: I want to be able to close an open section instead of just opening another one

closed as unclear what you're asking by glls, Himanshu, Boris Bachovski, Oleksandr Berehovskyi, Raul Mar 13 '18 at 9:16

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • by default, the expanded region is the first one, the attribute that controls this is --> activeSectionName, you can change the behavior to default to none, or do you want to be able to expand multiple regions simopultaneously? can you be a bit more specific? – glls Mar 12 '18 at 16:38
  • I want to be able to close an open section instead of just opening another one – Aka Mar 12 '18 at 17:33
2

lightning:accordion always has one section open. That's how they're designed to behave. If you need/want to have multiple sections open, or no sections open, you'd have to write your own component set.

  • Ok got it,are there any good alternatives to the accordion where i can do this? Preferably in Lightning. – Aka Mar 12 '18 at 17:35
  • @Aka - you can add a default accordion and make it hidden through CSS. I tried and it worked for me. In the UI it will look as if all accordions are closed – RedDevil Mar 13 '18 at 5:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.