Close button
A generic close button for dismissing content like modals and alerts.
Example
<button type="button" class="btn-close" aria-label="Close"></button>
Disabled state
Disabled close buttons change their opacity. We’ve also applied pointer-events: none and user-select: none to preventing hover and active states from triggering.
Use
disabled attibute to enable disabled state.
<button type="button" class="btn-close" disabled aria-label="Close"></button>
White variant
Change the default .btn-close to be white with the .btn-close-white class. This class uses the filter property to invert the background-image.
<ul class="d-flex gap g-2">
<li> <button type="button" class="btn-close btn-close-white" aria-label="Close"></button></li>
<li><button type="button" class="btn-close btn-close-white" disabled aria-label="Close"></button></li>
</ul>