![]() |
VOOZH | about |
Bootstrap5 collapse options are used to group the collapsible elements under a single parent. It can be done by extending the data attributes with the option name along with "data-" for example data-bs-parent="".
Bootstrap 5 Collapse Options Attributes:
Syntax :
<div class="collapse" data-bs-*="id">
Contents...
<div>
The '*' can be replaced by parent/toggle.
Example 1:In this example, we will demonstrate data-bs-toggle.
Output :
Example 2:In this example we will demonstrate the collapse option "data-bs-parent".
Output :
Reference: https://getbootstrap.com/docs/5.0/components/collapse/#options