diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index 92355f29..47dee3fa 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -116,7 +116,7 @@ The alert sign (`+` or `-`) is optional to control whether the admonition is fol | `header` | **Optional.** Alias for `title`, kept for compatibility with other shortcodes. | -**Example:** +**Example 1: `mode="open"` (multiple items can be open)** ```md {{}} @@ -140,6 +140,30 @@ The alert sign (`+` or `-`) is optional to control whether the admonition is fol {{< /accordionItem >}} {{< /accordion >}} +**Example 2: `mode="collapse"` (only one item open at a time)** + +```md +{{}} + {{}} + First item content. + {{}} + + {{}} + Second item content. + {{}} +{{}} +``` + +{{< accordion mode="collapse" >}} + {{< accordionItem title="First item" open=true >}} + First item content. + {{< /accordionItem >}} + + {{< accordionItem title="Second item" >}} + Second item content. + {{< /accordionItem >}} +{{< /accordion >}} +


## Article