Check out example codes for "text limit in html". It will help you in understanding the concepts better.

Code Example 1

<input type="text" id="username" name="username" maxlength="10">

Code Example 2

<span style="
  display:inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 13ch;">
Lorem ipsum dolor sit amet
</span>

Code Example 3

<input maxlength="10" />

Learn ReactJs, React Native from akashmittal.com