JSFiddle - React, Tailwind, and code Playground

by Cone

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Assessment Form</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f9f9f9;
            color: #333;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        .form-container {
            background-color: #ffffff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            width: 300px;
        }
        h2 {
            color: #4CAF50;
            text-align: center;
            margin-bottom: 20px;
        }
        .form-group {
            margin-bottom: 15px;
        }
        .form-group label {
            display: block;
            margin-bottom: 5px;
            color: #555;
        }
        .form-group input[type="text"],
        .form-group input[type="tel"],
        .form-group textarea {
            width: 100%;
            padding: 10px;
            border-radius: 4px;
            border: 1px solid #ccc;
            font-size: 14px;
        }
        .form-group input[type="radio"] {
            margin-right: 10px;
        }
        .form-group textarea {
            display: none;
            resize: none;
            height: 80px;
            transition: opacity 0.5s ease, max-height 0.5s ease;
            opacity: 0;
            max-height: 0;
        }
        .form-group textarea.show {
            display: block;
            opacity: 1;
            max-height: 100px;
        }
        .form-group .checkbox-group {
            display: flex;
            align-items: center;
        }
        .form-group .checkbox-group input {
            margin-right: 10px;
        }
        .submit-btn {
            background-color: #4CAF50;
            color: #ffffff;
         ...