# AutoResizeDirective

**Type:** directive

<p>A directive that automatically adjusts the height of a textarea based on its content.</p>
<p>The AutoResizeDirective automatically adjusts the height of a textarea element as the user types,
ensuring that all content is visible without requiring manual resizing or scrolling.
It supports minimum and maximum row constraints and can be enabled/disabled dynamically.</p>
<b>Example :</b><div><pre class="line-numbers"><code class="language-html">&lt;textarea autoResize [minRows]=&quot;2&quot; [maxRows]=&quot;5&quot;&gt;&lt;/textarea&gt;</code></pre></div>

**Selector:** `textarea[autoResize]`

**Standalone:** false

## Inputs

- **autoResize**: `boolean, BooleanInput` - <p>Controls whether the auto-resize functionality is enabled.
When true, the textarea will automatically adjust its height based on content.
When false, the textarea will behave normally.</p>

- **maxRows**: `number, NumberInput` - <p>Sets the maximum number of rows for the textarea.
When set to a value greater than 0, the textarea will not grow beyond this number of rows
and will show scrollbars if necessary.
When set to 0, there is no maximum limit.</p>

- **minRows**: `number, NumberInput` - <p>Sets the minimum number of rows for the textarea.
This value determines the initial height of the textarea.</p>

