# Inline mode

By default, the widget runs in modal mode. To use the widget in inline mode, employ the `setOptions` method:

```javascript
window.transactionlink.setOptions({
  inline: true // boolean,
  autoHeight: true, // boolean, enables automatic height adjustment based on content
  showCloseButton: undefined, // boolean | undefined - if set to true, displays the close button in inline mode; defaults to undefined (hidden)
  ...otherOptions
});
```

* When autoHeight is enabled, the widget or iframe will dynamically adjust its size based on the content inside, ensuring proper rendering without requiring a fixed height.
* The showCloseButton option controls whether a close button appears in inline mode. By default, it is undefined, meaning the button is hidden. If explicitly set to true, the button will be displayed.

Note that the optimal way to use the widget in inline mode is to place the widget element inside a container with fixed width and height:

```haml
<div class="widget-wrapper">
    <div id="transactionlink-widget" />
</div>
```

```css
.widget-wrapper {
  width: 100%;
  height: 100%;
}
```

This ensures proper rendering and display of the inline widget.


---

# 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.transactionlink.io/docs/v1/js-api/inline-mode.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.
