Collapsible options
Examples of elements and states
Inline or block element

In this example, collapsible JS plugin is attached to inline <span> element instead of button or link

Toggle content
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch.
Text links

Inline links with href attribute also can toggle the visibility of content, where href is an ID of collapsible container

Toggle content
Single or multiple icons

Content in block or inline elements can contain text, image, SVG, or icon. Here text link contains icon only

Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch.
Link with href

While not recommended from a semantic point of view, you can also use a link with the href attribute

Button with data attribute

We recommend using a button with the data-bs-target attribute, use of data-bs-toggle="collapse" is required

Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch.
Input with data attribute

You can also use collapsible attached to input type="button", although this tag is generally not recommended

Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch.
Open by default

Collapsible content can be expanded by default. Use .show in .collapse element to expand content

Collapsible width

Add the .collapse-horizontal modifier class to .collapseand set a width on the immediate child element

Content
Input with data attribute

A button or a can show and hide multiple elements by referencing them with a selector in its href or data-bs-target attribute

First column
Second column
Accordion markup

Collapsible content sections can be attached to any markup, in this example it's using markup from our Accordion component. The accordion component has two main states: collapsed and expanded. The chevron icon at the end of the accordion indicates which state the accordion is in. The chevron points down to indicate collapsed and up to indicate expanded.

Example

This is the first item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.

This is the second item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.

This is the third item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
Cards

Content cards can be collapsible as well, and you can control what toggler triggers it: all elements in card header, card title text, icon or a specific element. Be sure to place the toggler outside <div class="collapse"> container. In the following example card title is a regular anchor element with .text-body class that is highlighted with different color in active state.

Example
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch.
Тon cupidatat skateboard dolor brunch. Тesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda.
3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it.
Card group

Card group is a list of cards that are displayed seamlessly as 1 component. All cards in this layout require a wrapper container with .card-group-vertical class, which cleans up all spacings and borders in children cards. Height collapse in horizontal card group is also supported. Toggler options are similar to previous example.

Example
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch.
Тon cupidatat skateboard dolor brunch. Тesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda.
3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it.
Toggle indicator

You can also add a visual indication of current collapsible state. The icon is not hardcoded, which means you can use any icon from the default pack, just make sure you add .collapsible-indicator class to icon element. This class looks for .collapsed class in parent container and rotates the icon depending on the state. Icon indicator can aligned to the left and right.

Left indicator example
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch.
Тon cupidatat skateboard dolor brunch. Тesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda.
3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it.
Right indicator example
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch.
Тon cupidatat skateboard dolor brunch. Тesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda.
3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it.
Nested elements

All collapsible elements work independently, if ID's in toggle button and collapsible containers match. This allows you to have as many nested collapsible elements as we need. In this example we have a set of collapsible cards, each of them has another set of collapsible elements. All options from the examples above are fully supported.

Example

Here goes some text content and a set of collapsible elements in the card #1

Card content #1
Card content #2

Here goes some text content and a set of collapsible elements in the card #2

Card content #1
Card content #2

Here goes some text content and a set of collapsible elements in the card #3

Card content #1
Card content #2
Activity
New notifications
James has completed the task Submit documents from Onboarding list
2 hours ago
Margo has added 4 users to Customer enablement channel
3 hours ago
Subscription #466573 from 10.12.2021 has been cancelled. Refund case #4492 created
4 hours ago
Older notifications
Nick requested your feedback and approval in support request #458
3 days ago
Mike added 1 new file(s) to Product management project
new_contract.pdf
112KB
1 day ago
All hands meeting will take place coming Thursday at 13:45.
2 days ago
Christine commented on your community post from 10.12.2021
2 days ago
HR department requested you to complete internal survey by Friday
3 days ago
Loading...
Demo configuration
Color mode
Direction
Layouts
Purchase Limitless