JSFiddle - React, Tailwind, and code Playground

HTML

<div class='test'>Some text</div>
<input class='test' value='Some text'/>

JavaScript

$('.test').disableSelection().css('webkit-user-select','none');