Farigh UI Logo

Farigh UI

Source Code

login-welcome-back.tsx
1"use client";
2
3import { useState } from "react";
4
5export const LoginWelcomeBack = () => {
6  const [email, setEmail] = useState("");
7
8  const handleEmailSubmit = (e: React.FormEvent) => {
9    e.preventDefault();
10    console.log("Sign in with email:", email);
11  };
12
13  const handleGoogleSignIn = () => {
14    console.log("Sign in with Google");
15  };
16
17  const handleAppleSignIn = () => {
18    console.log("Sign in with Apple");
19  };
20
21  return (
22    <div className="flex h-screen w-full">
23      <div className="flex flex-1 flex-col px-6 py-12 lg:px-16 xl:px-24 bg-white">
24        <div className="mx-auto w-full max-w-[520px] flex-grow flex flex-col justify-center">
25          {/* Heading */}
26          <div className="mb-10 text-center">
27            <h2 className="text-[44px] leading-[1.1] font-medium text-primary/80 tracking-tight mb-4">
28              Welcome back!
29            </h2>
30            <p className="text-[15px] text-gray-500 leading-relaxed">
31              Your work, your team, your flow — all in one place.
32            </p>
33          </div>
34
35          <div className="flex gap-3 mb-8">
36            <button
37              onClick={handleGoogleSignIn}
38              className="flex-1 flex items-center justify-center gap-2.5 rounded-full border border-gray-200 bg-white px-5 py-3.5 text-[15px] font-medium text-black hover:bg-gray-50 transition-colors"
39            >
40              <svg className="h-5 w-5" viewBox="0 0 24 24">
41                <path
42                  d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"
43                  fill="#4285F4"
44                />
45                <path
46                  d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
47                  fill="#34A853"
48                />
49                <path
50                  d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"
51                  fill="#FBBC05"
52                />
53                <path
54                  d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"
55                  fill="#EA4335"
56                />
57              </svg>
58              Sign In with Google
59            </button>
60
61            <button
62              onClick={handleAppleSignIn}
63              className="flex-1 flex items-center justify-center gap-2.5 rounded-full border border-gray-200 bg-white px-5 py-3.5 text-[15px] font-medium text-black hover:bg-gray-50 transition-colors"
64            >
65              <svg className="h-5 w-5" viewBox="0 0 24 24" fill="currentColor">
66                <path d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z" />
67              </svg>
68              Sign In with Apple
69            </button>
70          </div>
71
72          {/* Divider */}
73          <div className="relative mb-8">
74            <div className="absolute inset-0 flex items-center">
75              <div className="w-full border-t border-gray-200" />
76            </div>
77            <div className="relative flex justify-center text-sm">
78              <span className="bg-white px-4 text-gray-400">Or</span>
79            </div>
80          </div>
81
82          {/* Email Form */}
83          <form onSubmit={handleEmailSubmit} className="mb-6">
84            <input
85              type="email"
86              value={email}
87              onChange={(e) => setEmail(e.target.value)}
88              placeholder="Enter your email"
89              className="block w-full rounded-full border border-gray-200 px-5 py-3.5 text-[15px] text-black placeholder:text-gray-400 focus:border-gray-300 focus:outline-none focus:ring-0 transition-colors mb-4"
90              required
91            />
92
93            <button
94              type="submit"
95              className="w-full rounded-full bg-primary px-5 py-3.5 text-[15px] font-medium text-white hover:bg-primary/90 transition-colors"
96            >
97              Sign in with email
98            </button>
99          </form>
100
101          {/* Sign Up Link */}
102          <p className="text-center text-[15px] text-gray-500">
103            Don&apos;t have an account?{" "}
104            <a
105              href="#"
106              className="text-black font-bold hover:text-gray-700 transition-colors"
107            >
108              Sign Up
109            </a>
110          </p>
111        </div>
112
113        {/* Footer Links */}
114        <div className="mx-auto w-full max-w-[520px] flex items-center justify-center gap-8 text-[13px] text-gray-400 pb-6">
115          <a href="#" className="hover:text-gray-600 transition-colors">
116            Help
117          </a>
118          \
119          <a href="#" className="hover:text-gray-600 transition-colors">
120            Terms
121          </a>
122          \
123          <a href="#" className="hover:text-gray-600 transition-colors">
124            Privacy
125          </a>
126        </div>
127      </div>
128
129      {/* Right Side - Image */}
130      <div className="hidden lg:block lg:flex-1 relative overflow-hidden bg-gray-100">
131        <img
132          src="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?q=80&w=2070&auto=format&fit=crop"
133          alt="Mountain landscape"
134          className="absolute inset-0 h-full w-full object-cover grayscale"
135        />
136      </div>
137    </div>
138  );
139};
140

Related

Wincher SEO Dashboard - Free React component preview

Wincher SEO Dashboard

Fleet Management Dashboard - Free React component preview

Fleet Management Dashboard

Stellar Pricing - Free React component preview

Stellar Pricing

Autobizz Financial Dashboard - Free React component preview

Autobizz Financial Dashboard