# Close

The Bootstrap `close` component, implemented in Ruby. Use it like any other matestack component in your apps, pages and components. It offers customizable options to simply achieve what is possible in bootstrap with this component. See below for more information about the possible options.

## `bs_close(*args, &block)`

Returns a bootstrap close button for dismissing content like modals and alerts. Also the close is customizable with the following options.

**Optional options**

* `dismiss` - specify which component the close button is used for
* Html attributes - all w3c confirm html attributes for div's can be set via options and will be added to the surrounding close div.

## Examples

### Example 1: Display basic close button

```ruby
bs_close
```

returns

```markup
<button type="button" class="close" aria-label="Close">
  <span aria-hidden="true">&times;</span>
</button>
```

### Example 2: Using close button for dismissing a modal content

```ruby
bs_close dismiss: "modal"
```

returns

```markup
<button type="button" class="close" aria-label="Close" data-dismiss="modal">
  <span aria-hidden="true">&times;</span>
</button>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.matestack.io/matestack-ui-bootstrap/api/components/close.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
