Shrink Accordion by clicking summary? #2199
-
Hello everyone! I'm building my first app with Svelte/SkeletonUI and find myself using the accordion component in a few places. I was wondering - is there a built-in way to set it so that clicking the summary heading on an AccordionItem closes that item back down? I felt like this is a pretty common behavior in accordion components around the web, but didn't see that functionality listed in the docs. If this isn't built-in, is there a clean way you'd recommend I incorporate that functionality? I think I could figure out a way through events and if statements, but it feels clunky in my head and I assume there is a smarter way to do it than what I'm considering. I think this question makes sense without including any code or pictures, but let me know if that's not the case and there is anything I can provide to clarify my question. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@DiceBreakers we offer two modes for this component based on the
https://www.skeleton.dev/components/accordions#autocollapse-mode |
Beta Was this translation helpful? Give feedback.
@DiceBreakers we offer two modes for this component based on the
autocollapse
setting:https://www.skeleton.dev/components/accordions#autocollapse-mode