JSFiddle - React, Tailwind, and code Playground
HTML
<div data-chart="1">
<div class="chart"><span> Completed</span></div>
</div>
CSS
[data-chart="1"] .chart:before {
content: "50%";
}
JavaScript
$('[data-chart="1"] .donut-chart:before').css('content', '100%');