Close button
Bootstrap 5 Close button
Close button built with the latest Bootstrap 5. Multiple code examples: for modal, with icon, with alert & many more
Basic example
<button type="button" class="btn-close" aria-label="Close"></button>
Disabled
Add disabled
attribute to prevent triggering hover and active states.
<button type="button" class="btn-close" disabled aria-label="Close"></button>
White variant
Add btn-close-white
class to change color on dark backround.
<button type="button" class="btn-close btn-close-white" aria-label="Close"></button>