Close button
Bootstrap 5 Close button
Close button for the latest Bootstrap 5. Component used to dismiss content of modals, alerts, and popovers.
Basic example
Provide an option to dismiss or close a component with .btn-close
.
Disabled
Add disabled
attribute to prevent triggering hover and active states.
White variant
Add data-mdb-theme="dark"
to the .btn-close
, or to its parent element, to invert the close button.
Close button - API
SCSS variables
Close button uses Sass variables and Sass customization is supported.