# AutoResizeDirective

**Type:** directive



A directive that automatically adjusts the height of a textarea based on its content.

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.

```html
<textarea autoResize [minRows]="2" [maxRows]="5"></textarea>
```

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

## Inputs
- **autoResize**: `boolean, BooleanInput` - 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.
- **maxRows**: `number, NumberInput` - 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.
- **minRows**: `number, NumberInput` - Sets the minimum number of rows for the textarea. This value determines the initial height of the textarea.
