Close button

A generic close button for dismissing content like modals and alerts.

Bootstrap docs

Properties:

  • Size: size (string) - Bootstrap button size class (default: '')

  • Disabled state: disabled (boolean) - Disabled button (default: false)

Usage

An actual use case is within the Toasts component like so:

{% include 'radix:close-button' with {
  size: 'btn-sm',
  disabled: false,
  close_button_attributes: create_attribute()
    .setAttribute('data-bs-dismiss', 'modal')
} %}

Last updated