Components
Loading preview...
Here is Login & Signup component
@ephraimduncan
npx shadcn@latest add https://21st.dev/r/ephraimduncan/login-signupimport { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Separator } from "@/components/ui/separator";
import { JSX, SVGProps } from "react";
const GitHubIcon = (
props: JSX.IntrinsicAttributes & SVGProps<SVGSVGElement>
) => (
<svg fill="currentColor" viewBox="0 0 24 24" {...props}>
<path d="M12.001 2C6.47598 2 2.00098 6.475 2.00098 12C2.00098 16.425 4.86348 20.1625 8.83848 21.4875C9.33848 21.575 9.52598 21.275 9.52598 21.0125C9.52598 20.775 9.51348 19.9875 9.51348 19.15C7.00098 19.6125 6.35098 18.5375 6.15098 17.975C6.03848 17.6875 5.55098 16.8 5.12598 16.5625C4.77598 16.375 4.27598 15.9125 5.11348 15.9C5.90098 15.8875 6.46348 16.625 6.65098 16.925C7.55098 18.4375 8.98848 18.0125 9.56348 17.75C9.65098 17.1 9.91348 16.6625 10.201 16.4125C7.97598 16.1625 5.65098 15.3 5.65098 11.475C5.65098 10.3875 6.03848 9.4875 6.67598 8.7875C6.57598 8.5375 6.22598 7.5125 6.77598 6.1375C6.77598 6.1375 7.61348 5.875 9.52598 7.1625C10.326 6.9375 11.176 6.825 12.026 6.825C12.876 6.825 13.726 6.9375 14.526 7.1625C16.4385 5.8625 17.276 6.1375 17.276 6.1375C17.826 7.5125 17.476 8.5375 17.376 8.7875C18.0135 9.4875 18.401 10.375 18.401 11.475C18.401 15.3125 16.0635 16.1625 13.8385 16.4125C14.201 16.725 14.5135 17.325 14.5135 18.2625C14.5135 19.6 14.501 20.675 14.501 21.0125C14.501 21.275 14.6885 21.5875 15.1885 21.4875C19.259 20.1133 21.9999 16.2963 22.001 12C22.001 6.475 17.526 2 12.001 2Z" />
</svg>
);
const GoogleIcon = (
props: JSX.IntrinsicAttributes & SVGProps<SVGSVGElement>
) => (
<svg fill="currentColor" viewBox="0 0 24 24" {...props}>
<path d="M3.06364 7.50914C4.70909 4.24092 8.09084 2 12 2C14.6954 2 16.959 2.99095 18.6909 4.60455L15.8227 7.47274C14.7864 6.48185 13.4681 5.97727 12 5.97727C9.39542 5.97727 7.19084 7.73637 6.40455 10.1C6.2045 10.7 6.09086 11.3409 6.09086 12C6.09086 12.6591 6.2045 13.3 6.40455 13.9C7.19084 16.2636 9.39542 18.0227 12 18.0227C13.3454 18.0227 14.4909 17.6682 15.3864 17.0682C16.4454 16.3591 17.15 15.3 17.3818 14.05H12V10.1818H21.4181C21.5364 10.8363 21.6 11.5182 21.6 12.2273C21.6 15.2727 20.5091 17.8363 18.6181 19.5773C16.9636 21.1046 14.7 22 12 22C8.09084 22 4.70909 19.7591 3.06364 16.4909C2.38638 15.1409 2 13.6136 2 12C2 10.3864 2.38638 8.85911 3.06364 7.50914Z" />
</svg>
);
const Logo = (props: JSX.IntrinsicAttributes & SVGProps<SVGSVGElement>) => (
<svg
fill="currentColor"
height="48"
viewBox="0 0 40 48"
width="40"
{...props}
>
<clipPath id="a">
<path d="m0 0h40v48h-40z" />
</clipPath>
<g clipPath="url(#a)">
<path d="m25.0887 5.05386-3.933-1.05386-3.3145 12.3696-2.9923-11.16736-3.9331 1.05386 3.233 12.0655-8.05262-8.0526-2.87919 2.8792 8.83271 8.8328-10.99975-2.9474-1.05385625 3.933 12.01860625 3.2204c-.1376-.5935-.2104-1.2119-.2104-1.8473 0-4.4976 3.646-8.1436 8.1437-8.1436 4.4976 0 8.1436 3.646 8.1436 8.1436 0 .6313-.0719 1.2459-.2078 1.8359l10.9227 2.9267 1.0538-3.933-12.0664-3.2332 11.0005-2.9476-1.0539-3.933-12.0659 3.233 8.0526-8.0526-2.8792-2.87916-8.7102 8.71026z" />
<path d="m27.8723 26.2214c-.3372 1.4256-1.0491 2.7063-2.0259 3.7324l7.913 7.9131 2.8792-2.8792z" />
<path d="m25.7665 30.0366c-.9886 1.0097-2.2379 1.7632-3.6389 2.1515l2.8794 10.746 3.933-1.0539z" />
<path d="m21.9807 32.2274c-.65.1671-1.3313.2559-2.0334.2559-.7522 0-1.4806-.102-2.1721-.2929l-2.882 10.7558 3.933 1.0538z" />
<path d="m17.6361 32.1507c-1.3796-.4076-2.6067-1.1707-3.5751-2.1833l-7.9325 7.9325 2.87919 2.8792z" />
<path d="m13.9956 29.8973c-.9518-1.019-1.6451-2.2826-1.9751-3.6862l-10.95836 2.9363 1.05385 3.933z" />
</g>
</svg>
);
export default function Login04() {
return (
<div className="flex items-center justify-center min-h-screen">
<div className="flex flex-1 flex-col justify-center px-4 py-10 lg:px-6">
<div className="sm:mx-auto sm:w-full sm:max-w-md">
<div className="flex items-center space-x-1.5">
<Logo
className="h-7 w-7 text-foreground dark:text-foreground"
aria-hidden={true}
/>
<p className="font-medium text-lg text-foreground dark:text-foreground">
Acme
</p>
</div>
<h3 className="mt-6 text-lg font-semibold text-foreground dark:text-foreground">
Sign in to your account
</h3>
<p className="mt-2 text-sm text-muted-foreground dark:text-muted-foreground">
Don't have an account?{" "}
<a
href="#"
className="font-medium text-primary hover:text-primary/90 dark:text-primary hover:dark:text-primary/90"
>
Sign up
</a>
</p>
<div className="mt-8 flex flex-col items-center space-y-2 sm:flex-row sm:space-x-4 sm:space-y-0">
<Button
variant="outline"
className="flex-1 items-center justify-center space-x-2 py-2"
asChild
>
<a href="#">
<GitHubIcon className="size-5" aria-hidden={true} />
<span className="text-sm font-medium">Login with GitHub</span>
</a>
</Button>
<Button
variant="outline"
className="mt-2 flex-1 items-center justify-center space-x-2 py-2 sm:mt-0"
asChild
>
<a href="#">
<GoogleIcon className="size-4" aria-hidden={true} />
<span className="text-sm font-medium">Login with Google</span>
</a>
</Button>
</div>
<div className="relative my-6">
<div className="absolute inset-0 flex items-center">
<Separator className="w-full" />
</div>
<div className="relative flex justify-center text-xs uppercase">
<span className="bg-background px-2 text-muted-foreground">
or
</span>
</div>
</div>
<form action="#" method="post" className="mt-6 space-y-4">
<div>
<Label
htmlFor="email-login-04"
className="text-sm font-medium text-foreground dark:text-foreground"
>
Email
</Label>
<Input
type="email"
id="email-login-04"
name="email-login-04"
autoComplete="email"
placeholder="ephraim@blocks.so"
className="mt-2"
/>
</div>
<div>
<Label
htmlFor="password-login-04"
className="text-sm font-medium text-foreground dark:text-foreground"
>
Password
</Label>
<Input
type="password"
id="password-login-04"
name="password-login-04"
autoComplete="password"
placeholder="********"
className="mt-2"
/>
</div>
<Button type="submit" className="mt-4 w-full py-2 font-medium">
Sign in
</Button>
</form>
<p className="mt-6 text-sm text-muted-foreground dark:text-muted-foreground">
Forgot your password?{" "}
<a
href="#"
className="font-medium text-primary hover:text-primary/90 dark:text-primary hover:dark:text-primary/90"
>
Reset password
</a>
</p>
</div>
</div>
</div>
);
}