I saw that tutorial : radiobutton
So I decided to check it it works using the following code with React and Tailwind :
import React from "react";
import "./styles.css";
import "./styles/tailwind-pre-build.css";
import Navbar from "./components/Navbar";
import LivePortal from "./components/LivePortal";
import WorkContainer from "./components/WorkContainer";
import HomePage from "./components/Homepage";
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
const App = () => {
return (
<>
<input className="sr-only peer" type="radio" value="yes" name="answer" id="answer_yes">
<label
className="flex p-5 bg-white border border-gray-300 rounded-lg cursor-pointer focus:outline-none hover:bg-gray-50 peer-checked:ring-green-500 peer-checked:ring-2 peer-checked:border-transparent"
htmlFor="answer_yes">Yes</label>
<div className="absolute hidden w-5 h-5 peer-checked:block top-5 right-3">