I find that the Collapse component's name is a bit confusing. What it really means is a collapsable section that can be shown or hidden on a click action. Let's start by creating a simple collapsable section of text on the index.ejs template. Open that template and insert the following code wherever you like:
<p><a class="btn btn-primary" data-toggle="collapse" href="#collapse-link" aria-expanded="false">Collapse Link Trigger</a></p>
The Collapse component is broken into two parts. The first is the trigger to show or hide the collapsable content. The second is the actual content you want to show or hide. Let's review it in more detail to show how to code this up:
data-toggle attribute with a value of collapse on ithref for the link needs to be a unique ID name, in this case, #collapse-linkaria-expanded value to false because we want the collapsable content to be hidden on page loadOn page load, your new component should just appear like a regular button:

Now that the trigger for the Collapse is set up, we need to code the content container. After the link tag, insert the following code:
<div class="collapse" id="collapse-link"> <p class="alert alert-warning">This is some collapsable text.</p> </div>
Here's how to assemble this section of code:
<div> that needs to have a CSS class of collapse on it. You also need to include an ID here. This should match the ID you set as the href in the trigger link; in this case, #collapse-link.<div> you can include any content you want. This content will be the hidden, collapsable content that you will show or hide when the trigger is clicked. To make the example really obvious, I've wrapped a warning Alert around some text to make it stand out.After you've coded this up and saved your file, head to the browser, find the button, and click it. You should see the following in your window once you click the trigger link:

This is only a simple example of how you can code up the Collapse component. Using additional code and setup, you can use this component to create an Accordion.