Skip to content

Commit 4e6f4be

Browse files
committed
docs: update docs
1 parent 1876c41 commit 4e6f4be

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

docs/docs/api-reference/enriched-text-input.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ interface EnrichedTextInputProps extends Omit<ViewProps, 'children'> {
4040
editable?: boolean;
4141
mentionIndicators?: string[];
4242
defaultValue?: string;
43+
maxLength?: number;
4344
placeholder?: string;
4445
placeholderTextColor?: ColorValue;
4546
cursorColor?: ColorValue;
@@ -232,6 +233,22 @@ For details, see [sanitization](/core-functionalities/web-support).
232233

233234
:::
234235

236+
### `maxLength` {#maxlength}
237+
238+
Maximum number of characters the input's plain text may contain.
239+
240+
Typing past the limit is rejected (extra characters are ignored). Multi-character insertions (dictation, IME composition, paste, and programmatic APIs like `defaultValue`/`setValue()`) are truncated to what fits.
241+
242+
| Type | Default Value | Platform |
243+
| -------- | ------------- | ----------------- |
244+
| `number` | no limit | iOS, Android, Web |
245+
246+
:::note
247+
248+
Programmatic insertions respect the limit too - e.g. `setLink()`, `setMention()`, `setImage()`.
249+
250+
:::
251+
235252
### `onBlur` {#onblur}
236253

237254
Called whenever the input loses focus.

0 commit comments

Comments
 (0)