diff options
| author | Julien Déramond <[email protected]> | 2023-10-23 19:25:53 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-23 19:25:53 +0200 |
| commit | dac60074dc6cdc6c67a9e97fe46f4f43366df839 (patch) | |
| tree | 03d6c09e111a00e691d21c52077582ae4aa4032b /site/content/docs | |
| parent | d58e86e7308e82d9564f19577adbc5b228f06d58 (diff) | |
| download | bootstrap-dac60074dc6cdc6c67a9e97fe46f4f43366df839.tar.xz bootstrap-dac60074dc6cdc6c67a9e97fe46f4f43366df839.zip | |
Doc: add expanded accordion explanation (#39304)
Co-authored-by: Louis-Maxime Piton <[email protected]>
Diffstat (limited to 'site/content/docs')
| -rw-r--r-- | site/content/docs/5.3/components/accordion.md | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/site/content/docs/5.3/components/accordion.md b/site/content/docs/5.3/components/accordion.md index 227d11a86..8b22686ad 100644 --- a/site/content/docs/5.3/components/accordion.md +++ b/site/content/docs/5.3/components/accordion.md @@ -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"> |
