From cb24272544950461b68d47fb8e8b220e188b18c9 Mon Sep 17 00:00:00 2001 From: Peter Hartree Date: Wed, 14 Apr 2021 21:43:52 +0100 Subject: [PATCH] Add example: Panels stay open (#33553) * Add example: Panels stay open * Set unique element IDs in the new example * Update language Co-authored-by: Mark Otto Co-authored-by: Mark Otto --- site/content/docs/5.0/components/accordion.md | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/site/content/docs/5.0/components/accordion.md b/site/content/docs/5.0/components/accordion.md index 864ff90c5464..a4ef8272e763 100644 --- a/site/content/docs/5.0/components/accordion.md +++ b/site/content/docs/5.0/components/accordion.md @@ -101,6 +101,51 @@ Add `.accordion-flush` to remove the default `background-color`, some borders, a {{< /example >}} +### Always open + +Omit the `data-bs-parent` attribute on each `.accordion-collapse` to make accordion items stay open when another item is opened. + +{{< example >}} +
+
+

+ +

+
+
+ This is the first item's accordion body. It is shown by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow. +
+
+
+
+

+ +

+
+
+ This is the second item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow. +
+
+
+
+

+ +

+
+
+ This is the third item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow. +
+
+
+
+{{< /example >}} + ## Accessibility Please read the [collapse accessibility section]({{< docsref "/components/collapse#accessibility" >}}) for more information.