JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" name="a" id="a" value="bla bla bla bla bla" />
CSS
input {
width: 50px;
height: 50px;
white-space: pre;
word-break: break-word;
}
JavaScript
document.getElementById('a').value = 'Am I \n on a new line?';