1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-17 19:06:40 +02:00

Doc: add expanded accordion explanation (#39304)

Co-authored-by: Louis-Maxime Piton <louismaxime.piton@orange.com>
This commit is contained in:
Julien Déramond
2023-10-23 19:25:53 +02:00
committed by GitHub
parent d58e86e730
commit dac60074dc

View File

@@ -11,7 +11,7 @@ toc: true
## How it works
The accordion uses [collapse]({{< docsref "/components/collapse" >}}) internally to make it collapsible. To render an accordion that's expanded, add the `.open` class on the `.accordion`.
The accordion uses [collapse]({{< docsref "/components/collapse" >}}) internally to make it collapsible.
{{< callout info >}}
{{< partial "callouts/info-prefersreducedmotion.md" >}}
@@ -21,6 +21,10 @@ The accordion uses [collapse]({{< docsref "/components/collapse" >}}) internally
Click the accordions below to expand/collapse the accordion content.
To render an accordion that's expanded by default:
- add the `.show` class on the `.accordion-collapse` element.
- drop the `.collapsed` class from the `.accordion-button` element and set its `aria-expanded` attribute to `true`.
{{< example >}}
<div class="accordion" id="accordionExample">
<div class="accordion-item">