# Output

The HTML `<output>` tag, implemented in Ruby.

## Parameters

This component can take up to 5 optional 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 `<output>` should have.

### class (optional)

Expects a string with all classes the `<output>` should have.

### name (optional)

Specifies a name for the `<output>` element

### for (optional)

Specifies the relationship between the result of the calculation, and the elements used in the calculation

### form (optional)

Specifies one or more forms the `<output>` element belongs to

## Example 1:

```ruby
output name: 'x', for: 'a b', text: ''
```

returns

```markup
<output for="a b" name="x"></output>
```

## Example 2:

```ruby
output id: 'my-id', class: 'my-class', name: 'x', for: 'a b', form: 'form_id' do
  plain 'All attributes'
end
```

returns

```markup
<output for="a b" form="form_id" id="my-id" name="x" class="my-class">
  All attributes
</output>
```


---

# 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/output.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.
