JSFiddle - React, Tailwind, and code Playground
HTML
<button id='btn'>Click me</button>
<div class="field">
<label>remarks:</label>
<textarea id="id_remarks" name="remarks"></textarea>
</div>
JavaScript
document.getElementById('btn').onclick = function (){
if (document.getElementById('id_remarks').value =="")
{
alert("is Empty");
return;
}
}