formdarkbeginner

Dark Form

A sleek dark-themed login form with subtle borders and a gradient submit button.

Preview

Welcome back

Sign in to your account

<div class="bg-gray-950 p-8 rounded-2xl max-w-sm mx-auto shadow-2xl">
  <h2 class="text-2xl font-bold text-white mb-1">Welcome back</h2>
  <p class="text-gray-500 text-sm mb-6">Sign in to your account</p>
  <form class="space-y-4">
    <div>
      <label class="block text-sm font-medium text-gray-400 mb-1">Email</label>
      <input type="email" class="w-full px-4 py-2.5 bg-gray-900 border border-gray-800 rounded-lg text-white text-sm focus:outline-none focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 placeholder-gray-600" placeholder="you@example.com" />
    </div>
    <div>
      <label class="block text-sm font-medium text-gray-400 mb-1">Password</label>
      <input type="password" class="w-full px-4 py-2.5 bg-gray-900 border border-gray-800 rounded-lg text-white text-sm focus:outline-none focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 placeholder-gray-600" placeholder="••••••••" />
    </div>
    <button type="submit" class="w-full py-3 bg-gradient-to-r from-indigo-600 to-violet-600 text-white font-semibold rounded-lg hover:shadow-lg hover:shadow-indigo-500/25 transition-all">Sign In</button>
  </form>
</div>

Color Breakdown

Card Background

bg-gray-950

#030712

Input Background

bg-gray-900

#111827

Input Border

border-gray-800

#1f2937

Focus Border

focus:border-indigo-500

#6366f1

Label

text-gray-400

#9ca3af

Button Start

from-indigo-600

#4f46e5

Button End

to-violet-600

#7c3aed

Use Cases

Login pagesAdmin authenticationDark-themed apps

Browser Support

All modern browsers.

Related Recipes

Build Your Own Color Recipe

Use our Tailwind CSS tools to experiment with colors, gradients, and component styles.

Explore Tools

Frequently Asked Questions

How do I add a 'Forgot Password' link?
Add a <a> tag below the password field with text-sm text-indigo-400 hover:text-indigo-300 and float-right or text-right.