# EuiMaxLengthDirective

**Type:** directive

<p>A directive that adds maxLength functionality to input and textarea elements with visual feedback.
It shows the remaining characters count and provides visual indication when the limit is reached.</p>
<b>Example :</b><div><pre class="line-numbers"><code class="language-html">### Basic usage
```html
&lt;input [euiMaxlength]=&quot;50&quot;&gt;</code></pre></div><h3>With form control</h3>
<b>Example :</b><div><pre class="line-numbers"><code class="language-html">&lt;input [formControlName]=&quot;&#39;name&#39;&quot; [euiMaxlength]=&quot;100&quot;&gt;</code></pre></div><h3>Hide maxlength indicator</h3>
<b>Example :</b><div><pre class="line-numbers"><code class="language-html">&lt;textarea [euiMaxlength]=&quot;200&quot; [isShowMaxlength]=&quot;false&quot;&gt;&lt;/textarea&gt;</code></pre></div>

**Selector:** `
    input[euiMaxlength],
    textarea[euiMaxlength],
    [ngModel][euiMaxlength],
    [formControlName][euiMaxlength]`

**Standalone:** false

## Inputs

- **euiMaxlength**: `number` - 
- **isShowMaxlength**: `boolean` - 

## Outputs

- **maxLengthReached**: `EventEmitter<boolean>` - <p>Emits when the input value length reaches or exceeds the maxLength limit.
Emits true when a limit is reached, false when below limit.</p>

