Forma de gobierno minimalista en tono joya
Un componente de formulario minimalista y receptivo para sitios web gubernamentales o de servicios públicos, con tonos joya y compatibilidad con el modo oscuro. Incluye campos para información personal, datos de contacto y un mensaje.
Código HTML
<div class="p-4 sm:p-6 md:p-8 lg:p-12 bg-gray-100 dark:bg-gray-900 min-h-screen flex items-center justify-center font-sans">
<div class="w-full max-w-2xl bg-white dark:bg-gray-800 shadow-xl rounded-lg overflow-hidden border border-gray-200 dark:border-gray-700">
<div class="px-6 py-8 md:px-8 bg-gradient-to-r from-emerald-600 to-teal-700 dark:from-emerald-800 dark:to-teal-900 text-white">
<h2 class="text-2xl sm:text-3xl font-bold mb-2">Submit Your Inquiry</h2>
<p class="text-sm sm:text-base opacity-90">Please fill out the form below with accurate information. All fields are required unless otherwise noted.</p>
</div>
<form class="p-6 md:p-8 space-y-6 text-gray-800 dark:text-gray-200">
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<label for="first_name" class="block text-sm font-medium mb-1">First Name</label>
<input type="text" id="first_name" name="first_name" placeholder="John" required class="w-full px-4 py-2 rounded-md border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-gray-50 focus:outline-none focus:ring-2 focus:ring-emerald-500 dark:focus:ring-emerald-400 transition duration-200 ease-in-out placeholder-gray-400 dark:placeholder-gray-500">
</div>
<div>
<label for="last_name" class="block text-sm font-medium mb-1">Last Name</label>
<input type="text" id="last_name" name="last_name" placeholder="Doe" required class="w-full px-4 py-2 rounded-md border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-gray-50 focus:outline-none focus:ring-2 focus:ring-emerald-500 dark:focus:ring-emerald-400 transition duration-200 ease-in-out placeholder-gray-400 dark:placeholder-gray-500">
</div>
</div>
<div>
<label for="email" class="block text-sm font-medium mb-1">Email Address</label>
<input type="email" id="email" name="email" placeholder="[email protected]" required class="w-full px-4 py-2 rounded-md border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-gray-50 focus:outline-none focus:ring-2 focus:ring-emerald-500 dark:focus:ring-emerald-400 transition duration-200 ease-in-out placeholder-gray-400 dark:placeholder-gray-500">
</div>
<div>
<label for="phone" class="block text-sm font-medium mb-1">Phone Number (Optional)</label>
<input type="tel" id="phone" name="phone" placeholder="+1 (555) 123-4567" class="w-full px-4 py-2 rounded-md border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-gray-50 focus:outline-none focus:ring-2 focus:ring-emerald-500 dark:focus:ring-emerald-400 transition duration-200 ease-in-out placeholder-gray-400 dark:placeholder-gray-500">
</div>
<div>
<label for="subject" class="block text-sm font-medium mb-1">Subject of Inquiry</label>
<select id="subject" name="subject" required class="w-full px-4 py-2 rounded-md border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-gray-50 focus:outline-none focus:ring-2 focus:ring-emerald-500 dark:focus:ring-emerald-400 transition duration-200 ease-in-out">
<option value="" disabled selected>Select a subject</option>
<option value="general_inquiry">General Inquiry</option>
<option value="technical_support">Technical Support</option>
<option value="feedback">Feedback</option>
<option value="report_issue">Report an Issue</option>
<option value="other">Other</option>
</select>
</div>
<div>
<label for="message" class="block text-sm font-medium mb-1">Your Message</label>
<textarea id="message" name="message" rows="5" placeholder="Provide details about your inquiry..." required class="w-full px-4 py-2 rounded-md border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-gray-50 focus:outline-none focus:ring-2 focus:ring-emerald-500 dark:focus:ring-emerald-400 transition duration-200 ease-in-out placeholder-gray-400 dark:placeholder-gray-500 resize-y"></textarea>
</div>
<div class="flex items-center space-x-2">
<input type="checkbox" id="terms" name="terms" required class="h-5 w-5 text-emerald-600 dark:text-emerald-500 focus:ring-emerald-500 dark:focus:ring-emerald-400 border-gray-300 dark:border-gray-600 rounded">
<label for="terms" class="text-sm">I agree to the <a href="#" class="text-emerald-600 dark:text-emerald-500 hover:underline">terms and conditions</a>.</label>
</div>
<div class="flex justify-end">
<button type="submit" class="px-8 py-3 bg-emerald-600 hover:bg-emerald-700 dark:bg-emerald-700 dark:hover:bg-emerald-800 text-white font-semibold rounded-md shadow-lg transition duration-300 ease-in-out transform hover:scale-105 focus:outline-none focus:ring-4 focus:ring-emerald-500 dark:focus:ring-emerald-600 focus:ring-opacity-50">
Submit Inquiry
</button>
</div>
</form>
</div>
</div>
Componentes relacionados
Componente de formas brutalistas
Un componente de formularios web diseñado con un estilo brutalista con alto contraste y diseños inusuales, adecuado para el comercio electrónico y responsivo con soporte para temas oscuros.
Componente de formularios
Componente de formularios receptivo con diseño 3D, combinación de colores análoga, diseño simple para comercio electrónico con soporte de tema oscuro
Formulario de cuidado de la salud orgánico/inspirado en la naturaleza
Un componente de formulario simple y receptivo con un diseño natural y fluido, esquema de color azul corporativo y compatibilidad con modo oscuro, adecuado para aplicaciones médicas y de atención médica.