JSFiddle - React, Tailwind, and code Playground

HTML

<label for="">some text</label>

JavaScript

$("label:contains('some text')").css('color','Lime');