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 romankupchak93 committed Jan 5, 2024
1 parent 2cbdea2 commit c2ef1e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion site/content/docs/5.3/components/accordion.md
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 c2ef1e3

Please sign in to comment.