# Input

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

If you want to use the `input` in context of a matestack `form`, please use `form_input` documented [here](/matestack-ui-core/1.5.0/components-api/reactive-core-components/form.md)

## Parameters

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

### Input (optional)

Expects a symbol with that specifies the input type.

### HMTL attributes (optional)

This component accepts all the canonical [HTML global attributes](https://www.w3schools.com/tags/ref_standardattributes.asp) like `id` or `class`.

## Examples

### Example 1: Basic usage as text input

```ruby
input type: :text, id: "foo", class: "bar"
```

returns

```markup
<input type="text" id="foo" class="bar" />
```

### Example 2: Email input

```ruby
input type: :email, id: "foo", class: "bar"
```

returns

```markup
<input type="email" />
```

### Example 3: Range input

```ruby
input type: :range, attributes: { min: 0, max: 10, step: 0.5 }
```

returns

```markup
<input max="10" min="0" step="0.5" type="range" />
```


---

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