JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" id="input">

<p id="text">Выбрано!</p>

CSS

p {
  display: none;
}

JavaScript

const checkboxInput = document.getElementById("input");

const textBlock = document.getElementById("text");


checkboxInput.onclick = function() {

  if (checkboxInput.checked) {
    textBlock.style.display = "block";
  } else {
    textBlock.style.display = "none";
  }

}