Skip to content

Commit

Permalink
Doc: add expanded accordion explanation (twbs#39304)
Browse files Browse the repository at this point in the history
Co-authored-by: Louis-Maxime Piton <louismaxime.piton@orange.com>
  • Loading branch information
2 people authored and priyashpatil committed Nov 8, 2023
1 parent 8358c76 commit 7841a8f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion site/content/docs/5.3/components/accordion.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" >}}
Expand All @@ -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">
Expand Down

0 comments on commit 7841a8f

Please sign in to comment.