You can use a link with thehref
attribute, or a button with thedata-coreui-target
attribute. In both samples, thedata-coreui-toggle="collapse""
is required.
The collapse plugin also supports horizontal collapsing. Add the.collapse-horizontal
modifier class to transition thewidth
instead ofheight
and set awidth
on the immediate child element. Feel free to write your own custom Sass, use inline styles, or use ourwidth utilities.
A<button>
or<a>
can show and hide multiple elements by referencing them with a selector in itshref
ordata-coreui-target
attribute. Multiple<button>
or<a>
can show and hide an element if they each reference it with theirhref
ordata-coreui-target
attribute