認証コンポーネント

ダークテーマをサポートするログインフォームとサインアップフォーム、レスポンシブデザイン、プレースホルダー画像を備えた最小限の認証コンポーネント。

プレビュー

HTMLコード

<div class="min-h-screen flex items-center justify-center bg-gray-100 dark:bg-gray-900 p-4">
    <div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-8 w-full max-w-sm">
        <h2 class="text-2xl font-semibold text-center text-gray-800 dark:text-gray-200">Welcome Back!</h2>
        <p class="text-gray-600 dark:text-gray-400 text-center mb-6">Please login to your account</p>
        <form>
            <div class="mb-4">
                <label class="block text-gray-700 dark:text-gray-300" for="email">Email</label>
                <input type="email" id="email" name="email" class="w-full p-2 border rounded-lg border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-800 dark:text-gray-200 focus:outline-none focus:border-blue-500 dark:focus:border-blue-400" required>
            </div>
            <div class="mb-6">
                <label class="block text-gray-700 dark:text-gray-300" for="password">Password</label>
                <input type="password" id="password" name="password" class="w-full p-2 border rounded-lg border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-800 dark:text-gray-200 focus:outline-none focus:border-blue-500 dark:focus:border-blue-400" required>
            </div>
            <button type="submit" class="w-full py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-400 transition duration-150">Login</button>
        </form>
        <p class="mt-4 text-center text-gray-600 dark:text-gray-400">Don't have an account? <a href="#" class="text-blue-600 dark:text-blue-400 hover:underline">Sign up</a></p>
    </div>
 </div>

<div class="min-h-screen flex items-center justify-center bg-gray-100 dark:bg-gray-900 p-4">
    <div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-8 w-full max-w-sm mt-8">
        <h2 class="text-2xl font-semibold text-center text-gray-800 dark:text-gray-200">Create Account</h2>
        <p class="text-gray-600 dark:text-gray-400 text-center mb-6">Join us today</p>
        <form>
            <div class="mb-4">
                <label class="block text-gray-700 dark:text-gray-300" for="username">Username</label>
                <input type="text" id="username" name="username" class="w-full p-2 border rounded-lg border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-800 dark:text-gray-200 focus:outline-none focus:border-blue-500 dark:focus:border-blue-400" required>
            </div>
            <div class="mb-4">
                <label class="block text-gray-700 dark:text-gray-300" for="email">Email</label>
                <input type="email" id="email" name="email" class="w-full p-2 border rounded-lg border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-800 dark:text-gray-200 focus:outline-none focus:border-blue-500 dark:focus:border-blue-400" required>
            </div>
            <div class="mb-6">
                <label class="block text-gray-700 dark:text-gray-300" for="password">Password</label>
                <input type="password" id="password" name="password" class="w-full p-2 border rounded-lg border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-800 dark:text-gray-200 focus:outline-none focus:border-blue-500 dark:focus:border-blue-400" required>
            </div>
            <button type="submit" class="w-full py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-400 transition duration-150">Sign Up</button>
        </form>
        <p class="mt-4 text-center text-gray-600 dark:text-gray-400">Already have an account? <a href="#" class="text-blue-600 dark:text-blue-400 hover:underline">Login</a></p>
    </div>
</div>

関連コンポーネント

認証コンポーネント

ダークモード、レスポンシブエフェクト、JavaScript依存なしの認証コンポーネント。

開ける

認証コンポーネント

マイクロインタラクションで設計されたレスポンシブでインタラクティブなログインおよびサインアップコンポーネントで、ダークテーマをサポートするブログコンテンツインターフェイスに補色を使用します。

開ける

認証コンポーネント

マテリアルデザインとTailwind CSSによる補色スキームを使用した、ビジネスおよび企業のWebサイト向けのシンプルな認証コンポーネント。

開ける