From 359ed099e5b2f82bd602f2a6c45f43af8f2c87e8 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 14 Jun 2021 23:25:11 +0300 Subject: Add horizontal collapse support --- site/content/docs/5.0/components/collapse.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'site/content') diff --git a/site/content/docs/5.0/components/collapse.md b/site/content/docs/5.0/components/collapse.md index ac84ca964..3704fb636 100644 --- a/site/content/docs/5.0/components/collapse.md +++ b/site/content/docs/5.0/components/collapse.md @@ -40,6 +40,29 @@ Generally, we recommend using a button with the `data-bs-target` attribute. Whil {{< /example >}} +## Horizontal + +The collapse plugin also supports horizontal collapsing. Add the `.collapse-horizontal` modifier class to transition the `width` instead of `height` and set a `width` on the immediate child element. Feel free to write your own custom Sass, use inline styles, or use our [width utilities]({{< docsref "/utilities/sizing" >}}). + +{{< callout info >}} +Please note that while the example below has a `min-height` set to avoid excessive repaints in our docs, this is not explicitly required. **Only the `width` on the child element is required.** +{{< /callout >}} + +{{< example >}} +

+ +

+
+
+
+ This is some placeholder content for a horizontal collapse. It's hidden by default and shown when triggered. +
+
+
+{{< /example >}} + ## Multiple targets A `