From: Mark Otto Date: Sun, 8 Mar 2026 04:12:17 +0000 (-0800) Subject: Add nested accordion demo X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7092989cfaaebd6b824187168cfe096fa58ab08d;p=thirdparty%2Fbootstrap.git Add nested accordion demo --- diff --git a/site/src/content/docs/components/accordion.mdx b/site/src/content/docs/components/accordion.mdx index a29853848b..070688d0d8 100644 --- a/site/src/content/docs/components/accordion.mdx +++ b/site/src/content/docs/components/accordion.mdx @@ -143,6 +143,69 @@ Omit the `name` attribute on each `
` element to allow multiple accordio
`} /> +## Nested + +Accordions can be nested inside each other by placing a full `.accordion` within an `.accordion-body`. Use unique `name` attribute values for each level so the parent and child accordions operate independently. + + +
+ + Accordion Item #1 + + +
+ This is the first item's accordion body. It contains a nested accordion below. +
+
+ + Nested Item #1 + + +
+ This is the body of the first nested accordion item. +
+
+
+ + Nested Item #2 + + +
+ This is the body of the second nested accordion item. +
+
+
+ + Nested Item #3 + + +
+ This is the body of the third nested accordion item. +
+
+
+
+
+
+ + Accordion Item #2 + + +
+ This is the second item's accordion body. It does not contain a nested accordion. +
+
+
+ + Accordion Item #3 + + +
+ This is the third item's accordion body. It does not contain a nested accordion. +
+
+ `} /> + ## Accessibility The native `
` and `` elements provide built-in accessibility: