Skip to content

Commit

Permalink
Doc: add expanded accordion explanation (#39304)
Browse files Browse the repository at this point in the history
Co-authored-by: Louis-Maxime Piton <[email protected]>
  • Loading branch information
julien-deramond and louismaximepiton authored Oct 23, 2023
1 parent d58e86e commit dac6007
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 dac6007

Please sign in to comment.