# Iframe

The HTML iframe tag, implemented in Ruby.

## Parameters

This component can take 3 configuration params and either yield content or display what gets passed to the `text` configuration param.

### id (optional)

Expects a string with all ids the `iframe` should have.

### class (optional)

Expects a string with all classes the `iframe` should have for styling purpose.

### height (optional)

Specifies the height of an `iframe`.

### width (optional)

Specifies the width of an `iframe`.

### src

Specifies the address of the document to embed in the `iframe` tag.

### srcdoc

Specifies the HTML content of the page to show in the inline frame.

## Example 1: Yield a given block

```ruby
iframe id: "foo", class: "bar", src="https://www.demopage.com" do
  plain 'The browser does not support iframe.'
end
```

returns

```markup
<iframe id="foo" class="bar" src="https://www.demopage.com">
  The browser does not support iframe.
</iframe>
```

## Example 2: Render options\[:text] param

```ruby
iframe id: "foo", class: "bar", src="https://www.demopage.com", text: 'The browser does not support iframe.'
```

returns

```markup
<iframe id="foo" class="bar" src="https://www.demopage.com">
  The browser does not support iframe.
</iframe>
```


---

# 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-core/1.5.0/components-api/core-components/iframe.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.
