Login & Signup
Login and sign-up pages with email, social, magic link, and SSO.
Login
"use client"
import { GalleryVerticalEndIcon } from "lucide-react"
import { LoginForm } from "./components/login-form"
export default function LoginPage() {
return (
<div className="flex min-h-svh flex-col items-center justify-center gap-6 bg-muted p-6 md:p-10">
<div className="flex w-full max-w-sm flex-col gap-6">
<a href="#" className="flex items-center gap-2 self-center font-medium">
<div className="flex size-6 items-center justify-center rounded-md bg-primary text-primary-foreground">
<GalleryVerticalEndIcon className="size-4" />
</div>
Acme Inc.
</a>
<LoginForm />
</div>
</div>
)
}import { cn } from "cn"
import { Button } from "@/components/ui/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card"
import {
Field,
FieldDescription,
FieldGroup,
FieldLabel,
FieldSeparator,
} from "@/components/ui/field"
import { Input } from "@/components/ui/input"
export function LoginForm({
className,
...props
}: React.ComponentProps<"div">) {
return (
<div className={cn("flex flex-col gap-6", className)} {...props}>
<Card>
<CardHeader className="text-center">
<CardTitle className="text-xl">Welcome back</CardTitle>
<CardDescription>
Login with your Apple or Google account
</CardDescription>
</CardHeader>
<CardContent>
<form>
<FieldGroup>
<Field>
<Button variant="outline" type="button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path
d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"
fill="currentColor"
/>
</svg>
Login with Apple
</Button>
<Button variant="outline" type="button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path
d="M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z"
fill="currentColor"
/>
</svg>
Login with Google
</Button>
</Field>
<FieldSeparator className="*:data-[slot=field-separator-content]:bg-card">
Or continue with
</FieldSeparator>
<Field>
<FieldLabel htmlFor="email">Email</FieldLabel>
<Input
id="email"
type="email"
placeholder="m@example.com"
required
/>
</Field>
<Field>
<div className="flex items-center">
<FieldLabel htmlFor="password">Password</FieldLabel>
<a
href="#"
className="ml-auto text-sm underline-offset-4 hover:underline"
>
Forgot your password?
</a>
</div>
<Input id="password" type="password" required />
</Field>
<Field>
<Button type="submit">Login</Button>
<FieldDescription className="text-center">
Don't have an account? <a href="#">Sign up</a>
</FieldDescription>
</Field>
</FieldGroup>
</form>
</CardContent>
</Card>
<FieldDescription className="px-6 text-center">
By clicking continue, you agree to our <a href="#">Terms of Service</a>{" "}
and <a href="#">Privacy Policy</a>.
</FieldDescription>
</div>
)
}npx shadcn@latest add login-03Login with image
import { LoginForm } from "./components/login-form"
export default function LoginPage() {
return (
<div className="flex min-h-svh flex-col items-center justify-center bg-muted p-6 md:p-10">
<div className="w-full max-w-sm md:max-w-4xl">
<LoginForm />
</div>
</div>
)
}import { cn } from "cn"
import { Button } from "@/components/ui/button"
import { Card, CardContent } from "@/components/ui/card"
import {
Field,
FieldDescription,
FieldGroup,
FieldLabel,
FieldSeparator,
} from "@/components/ui/field"
import { Input } from "@/components/ui/input"
export function LoginForm({
className,
...props
}: React.ComponentProps<"div">) {
return (
<div className={cn("flex flex-col gap-6", className)} {...props}>
<Card className="overflow-hidden p-0">
<CardContent className="grid p-0 md:grid-cols-2">
<form className="p-6 md:p-8">
<FieldGroup>
<div className="flex flex-col items-center gap-2 text-center">
<h1 className="text-2xl font-bold">Welcome back</h1>
<p className="text-balance text-muted-foreground">
Login to your Acme Inc account
</p>
</div>
<Field>
<FieldLabel htmlFor="email">Email</FieldLabel>
<Input
id="email"
type="email"
placeholder="m@example.com"
required
/>
</Field>
<Field>
<div className="flex items-center">
<FieldLabel htmlFor="password">Password</FieldLabel>
<a
href="#"
className="ml-auto text-sm underline-offset-2 hover:underline"
>
Forgot your password?
</a>
</div>
<Input id="password" type="password" required />
</Field>
<Field>
<Button type="submit">Login</Button>
</Field>
<FieldSeparator className="*:data-[slot=field-separator-content]:bg-card">
Or continue with
</FieldSeparator>
<Field className="grid grid-cols-3 gap-4">
<Button variant="outline" type="button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path
d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"
fill="currentColor"
/>
</svg>
<span className="sr-only">Login with Apple</span>
</Button>
<Button variant="outline" type="button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path
d="M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z"
fill="currentColor"
/>
</svg>
<span className="sr-only">Login with Google</span>
</Button>
<Button variant="outline" type="button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path
d="M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z"
fill="currentColor"
/>
</svg>
<span className="sr-only">Login with Meta</span>
</Button>
</Field>
<FieldDescription className="text-center">
Don't have an account? <a href="#">Sign up</a>
</FieldDescription>
</FieldGroup>
</form>
<div className="relative hidden bg-muted md:block">
<img
src="/placeholder.svg"
alt="Image"
className="absolute inset-0 h-full w-full object-cover dark:brightness-[0.2] dark:grayscale"
/>
</div>
</CardContent>
</Card>
<FieldDescription className="px-6 text-center">
By clicking continue, you agree to our <a href="#">Terms of Service</a>{" "}
and <a href="#">Privacy Policy</a>.
</FieldDescription>
</div>
)
}npx shadcn@latest add login-04Sign up
"use client"
import { GalleryVerticalEndIcon } from "lucide-react"
import { SignupForm } from "./components/signup-form"
export default function SignupPage() {
return (
<div className="flex min-h-svh flex-col items-center justify-center gap-6 bg-muted p-6 md:p-10">
<div className="flex w-full max-w-sm flex-col gap-6">
<a href="#" className="flex items-center gap-2 self-center font-medium">
<div className="flex size-6 items-center justify-center rounded-md bg-primary text-primary-foreground">
<GalleryVerticalEndIcon className="size-4" />
</div>
Acme Inc.
</a>
<SignupForm />
</div>
</div>
)
}import { cn } from "cn"
import { Button } from "@/components/ui/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card"
import {
Field,
FieldDescription,
FieldGroup,
FieldLabel,
} from "@/components/ui/field"
import { Input } from "@/components/ui/input"
export function SignupForm({
className,
...props
}: React.ComponentProps<"div">) {
return (
<div className={cn("flex flex-col gap-6", className)} {...props}>
<Card>
<CardHeader className="text-center">
<CardTitle className="text-xl">Create your account</CardTitle>
<CardDescription>
Enter your email below to create your account
</CardDescription>
</CardHeader>
<CardContent>
<form>
<FieldGroup>
<Field>
<FieldLabel htmlFor="name">Full Name</FieldLabel>
<Input id="name" type="text" placeholder="John Doe" required />
</Field>
<Field>
<FieldLabel htmlFor="email">Email</FieldLabel>
<Input
id="email"
type="email"
placeholder="m@example.com"
required
/>
</Field>
<Field>
<Field className="grid grid-cols-2 gap-4">
<Field>
<FieldLabel htmlFor="password">Password</FieldLabel>
<Input id="password" type="password" required />
</Field>
<Field>
<FieldLabel htmlFor="confirm-password">
Confirm Password
</FieldLabel>
<Input id="confirm-password" type="password" required />
</Field>
</Field>
<FieldDescription>
Must be at least 8 characters long.
</FieldDescription>
</Field>
<Field>
<Button type="submit">Create Account</Button>
<FieldDescription className="text-center">
Already have an account? <a href="#">Sign in</a>
</FieldDescription>
</Field>
</FieldGroup>
</form>
</CardContent>
</Card>
<FieldDescription className="px-6 text-center">
By clicking continue, you agree to our <a href="#">Terms of Service</a>{" "}
and <a href="#">Privacy Policy</a>.
</FieldDescription>
</div>
)
}npx shadcn@latest add signup-03Login with Email and Google
import type { JSX, SVGProps } from "react"
import { Button, buttonVariants } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { Separator } from "@/components/ui/separator"
import { cn } from "@/lib/utils"
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>
)
export default function Login01() {
return (
<div className="flex min-h-dvh items-center justify-center">
<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-sm">
<h2 className="text-balance text-center font-semibold text-foreground text-xl">
Log in or create account
</h2>
<form action="#" className="mt-6" method="post">
<Label className="font-medium text-foreground" htmlFor="email">
Email
</Label>
<Input
autoComplete="email"
className="mt-2"
id="email"
name="email"
placeholder="john@company.com"
type="email"
/>
<Button className="mt-4 w-full" type="submit">
Sign in
</Button>
</form>
<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 with
</span>
</div>
</div>
<a
className={cn(
buttonVariants({ variant: "outline" }),
"inline-flex w-full items-center justify-center space-x-2"
)}
href="#"
>
<GoogleIcon aria-hidden={true} className="size-5" />
<span className="font-medium text-sm">Sign in with Google</span>
</a>
<p className="mt-4 text-pretty text-muted-foreground text-xs">
By signing in, you agree to our{" "}
<a className="underline underline-offset-4" href="#">
terms of service
</a>{" "}
and{" "}
<a className="underline underline-offset-4" href="#">
privacy policy
</a>
.
</p>
</div>
</div>
</div>
)
}npx shadcn@latest add https://blocks.so/r/login-01.jsonLogin with Email, Password and Google
import type { JSX, SVGProps } from "react"
import { Button, buttonVariants } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { Separator } from "@/components/ui/separator"
import { cn } from "@/lib/utils"
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>
)
export default function Login02() {
return (
<div className="flex min-h-dvh items-center justify-center">
<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-sm">
<h2 className="text-balance text-center font-semibold text-foreground text-xl">
Log in or create account
</h2>
<form action="#" className="mt-6 space-y-4" method="post">
<div>
<Label
className="font-medium text-foreground text-sm dark:text-foreground"
htmlFor="email-login-02"
>
Email
</Label>
<Input
autoComplete="email"
className="mt-2"
id="email-login-02"
name="email-login-02"
placeholder="ephraim@blocks.so"
type="email"
/>
</div>
<div>
<Label
className="font-medium text-foreground text-sm dark:text-foreground"
htmlFor="password-login-02"
>
Password
</Label>
<Input
autoComplete="password"
className="mt-2"
id="password-login-02"
name="password-login-02"
placeholder="**************"
type="password"
/>
</div>
<Button className="mt-4 w-full py-2 font-medium" type="submit">
Sign in
</Button>
</form>
<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 with
</span>
</div>
</div>
<a
className={cn(
buttonVariants({ variant: "outline" }),
"flex w-full items-center justify-center space-x-2 py-2"
)}
href="#"
>
<GoogleIcon aria-hidden={true} className="size-5" />
<span className="font-medium text-sm">Sign in with Google</span>
</a>
<p className="mt-4 text-pretty text-muted-foreground text-xs dark:text-muted-foreground">
By signing in, you agree to our{" "}
<a className="underline underline-offset-4" href="#">
terms of service
</a>{" "}
and{" "}
<a className="underline underline-offset-4" href="#">
privacy policy
</a>
.
</p>
</div>
</div>
</div>
)
}npx shadcn@latest add https://blocks.so/r/login-02.jsonLogin with Email and Password
"use client"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export default function Login03() {
return (
<div className="flex min-h-dvh items-center justify-center">
<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-sm">
<h3 className="text-balance text-center font-semibold text-foreground text-lg dark:text-foreground">
Welcome Back
</h3>
<p className="text-pretty text-center text-muted-foreground text-sm dark:text-muted-foreground">
Enter your credentials to access your account.
</p>
<form action="#" className="mt-6 space-y-4" method="post">
<div>
<Label
className="font-medium text-foreground text-sm dark:text-foreground"
htmlFor="email-login-03"
>
Email
</Label>
<Input
autoComplete="email"
className="mt-2"
id="email-login-03"
name="email-login-03"
placeholder="ephraim@blocks.so"
type="email"
/>
</div>
<div>
<Label
className="font-medium text-foreground text-sm dark:text-foreground"
htmlFor="password-login-03"
>
Password
</Label>
<Input
autoComplete="password"
className="mt-2"
id="password-login-03"
name="password-login-03"
placeholder="**************"
type="password"
/>
</div>
<Button className="mt-4 w-full py-2 font-medium" type="submit">
Sign in
</Button>
</form>
<p className="mt-6 text-pretty text-muted-foreground text-sm dark:text-muted-foreground">
Forgot your password?{" "}
<a
className="font-medium text-primary hover:text-primary/90 dark:text-primary dark:hover:text-primary/90"
href="#"
>
Reset password
</a>
</p>
</div>
</div>
</div>
)
}npx shadcn@latest add https://blocks.so/r/login-03.jsonLogin with Social Buttons
import type { JSX, SVGProps } from "react"
import { Button, buttonVariants } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { Separator } from "@/components/ui/separator"
import { cn } from "@/lib/utils"
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 min-h-dvh items-center justify-center">
<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
aria-hidden={true}
className="h-7 w-7 text-foreground dark:text-foreground"
/>
<p className="text-pretty font-medium text-foreground text-lg dark:text-foreground">
Acme
</p>
</div>
<h3 className="mt-6 text-balance font-semibold text-foreground text-lg dark:text-foreground">
Sign in to your account
</h3>
<p className="mt-2 text-pretty text-muted-foreground text-sm dark:text-muted-foreground">
Don't have an account?{" "}
<a
className="font-medium text-primary hover:text-primary/90 dark:text-primary hover:dark:text-primary/90"
href="#"
>
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">
<a
className={cn(
buttonVariants({ variant: "outline" }),
"flex-1 items-center justify-center space-x-2 py-2"
)}
href="#"
>
<GitHubIcon aria-hidden={true} className="size-5" />
<span className="font-medium text-sm">Login with GitHub</span>
</a>
<a
className={cn(
buttonVariants({ variant: "outline" }),
"mt-2 flex-1 items-center justify-center space-x-2 py-2 sm:mt-0"
)}
href="#"
>
<GoogleIcon aria-hidden={true} className="size-4" />
<span className="font-medium text-sm">Login with Google</span>
</a>
</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="#" className="mt-6 space-y-4" method="post">
<div>
<Label
className="font-medium text-foreground text-sm dark:text-foreground"
htmlFor="email-login-04"
>
Email
</Label>
<Input
autoComplete="email"
className="mt-2"
id="email-login-04"
name="email-login-04"
placeholder="ephraim@blocks.so"
type="email"
/>
</div>
<div>
<Label
className="font-medium text-foreground text-sm dark:text-foreground"
htmlFor="password-login-04"
>
Password
</Label>
<Input
autoComplete="password"
className="mt-2"
id="password-login-04"
name="password-login-04"
placeholder="********"
type="password"
/>
</div>
<Button className="mt-4 w-full py-2 font-medium" type="submit">
Sign in
</Button>
</form>
<p className="mt-6 text-pretty text-muted-foreground text-sm dark:text-muted-foreground">
Forgot your password?{" "}
<a
className="font-medium text-primary hover:text-primary/90 dark:text-primary hover:dark:text-primary/90"
href="#"
>
Reset password
</a>
</p>
</div>
</div>
</div>
)
}npx shadcn@latest add https://blocks.so/r/login-04.jsonLogin Card Signup Form
import type { JSX, SVGProps } from "react"
import { Button } from "@/components/ui/button"
import { Card, CardContent } from "@/components/ui/card"
import { Checkbox } from "@/components/ui/checkbox"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
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 Login05() {
return (
<div className="flex min-h-dvh items-center justify-center">
<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">
<Logo
aria-hidden={true}
className="mx-auto h-10 w-10 text-foreground dark:text-foreground"
/>
<h3 className="mt-2 text-balance text-center font-bold text-foreground text-lg dark:text-foreground">
Create new account for workspace
</h3>
</div>
<Card className="mt-4 shadow-2xs sm:mx-auto sm:w-full sm:max-w-md">
<CardContent>
<form action="#" className="space-y-4" method="post">
<div>
<Label
className="font-medium text-foreground text-sm dark:text-foreground"
htmlFor="name-login-05"
>
Name
</Label>
<Input
autoComplete="name-login-05"
className="mt-2"
id="name-login-05"
name="name-login-05"
placeholder="Name"
type="text"
/>
</div>
<div>
<Label
className="font-medium text-foreground text-sm dark:text-foreground"
htmlFor="email-login-05"
>
Email
</Label>
<Input
autoComplete="email-login-05"
className="mt-2"
id="email-login-05"
name="email-login-05"
placeholder="ephraim@blocks.so"
type="email"
/>
</div>
<div>
<Label
className="font-medium text-foreground text-sm dark:text-foreground"
htmlFor="password-login-05"
>
Password
</Label>
<Input
autoComplete="password-login-05"
className="mt-2"
id="password-login-05 "
name="password-login-05"
placeholder="Password"
type="password"
/>
</div>
<div>
<Label
className="font-medium text-foreground text-sm dark:text-foreground"
htmlFor="confirm-password-login-05"
>
Confirm password
</Label>
<Input
autoComplete="confirm-password-login-05"
className="mt-2"
id="confirm-password-login-05"
name="confirm-password-login-05"
placeholder="Password"
type="password"
/>
</div>
<div className="mt-2 flex items-start">
<div className="flex h-6 items-center">
<Checkbox
className="size-4"
id="newsletter-login-05"
name="newsletter-login-05"
/>
</div>
<Label
className="ml-3 text-muted-foreground text-sm leading-6 dark:text-muted-foreground"
htmlFor="newsletter-login-05"
>
Sign up to our newsletter
</Label>
</div>
<Button className="mt-4 w-full py-2 font-medium" type="submit">
Create account
</Button>
<p className="text-pretty text-center text-muted-foreground text-xs dark:text-muted-foreground">
By signing in, you agree to our{" "}
<a
className="text-primary capitalize hover:text-primary/90 dark:text-primary hover:dark:text-primary/90"
href="#"
>
Terms of use
</a>{" "}
and{" "}
<a
className="text-primary capitalize hover:text-primary/90 dark:text-primary hover:dark:text-primary/90"
href="#"
>
Privacy policy
</a>
</p>
</form>
</CardContent>
</Card>
<p className="mt-6 text-pretty text-center text-muted-foreground text-sm dark:text-muted-foreground">
Already have an account?{" "}
<a
className="font-medium text-primary hover:text-primary/90 dark:text-primary hover:dark:text-primary/90"
href="#"
>
Sign in
</a>
</p>
</div>
</div>
)
}npx shadcn@latest add https://blocks.so/r/login-05.jsonLogin with Magic Link and SSO
import type { JSX, SVGProps } from "react"
import { Button } from "@/components/ui/button"
import { Card, CardContent } from "@/components/ui/card"
import { Input } from "@/components/ui/input"
import { Separator } from "@/components/ui/separator"
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 Login06() {
return (
<div className="flex min-h-dvh items-center justify-center">
<Card className="w-full max-w-sm rounded-4xl px-6 py-10 pt-14 shadow-2xs">
<CardContent className="">
<div className="flex flex-col items-center space-y-8">
<Logo />
<div className="space-y-2 text-center">
<h1 className="text-balance font-semibold text-3xl text-foreground">
Welcome back!
</h1>
<p className="text-pretty text-muted-foreground text-sm">
First time here?{" "}
<a className="text-foreground hover:underline" href="#">
Sign up for free
</a>
</p>
</div>
<div className="w-full space-y-4">
<Input
className="w-full rounded-xl"
placeholder="Your email"
type="email"
/>
<div className="flex flex-col gap-2">
<Button className="w-full rounded-xl" size="lg">
Send me the magic link
</Button>
<Button
className="w-full text-muted-foreground text-sm"
variant="link"
>
Sign in using password
</Button>
</div>
<div className="flex items-center gap-4 py-2">
<Separator className="flex-1" />
<span className="text-muted-foreground text-sm">OR</span>
<Separator className="flex-1" />
</div>
<Button className="w-full rounded-xl" size="lg" variant="outline">
Single sign-on (SSO)
</Button>
</div>
<p className="w-11/12 text-pretty text-center text-muted-foreground text-xs">
You acknowledge that you read, and agree, to our{" "}
<a className="underline hover:text-foreground" href="#">
Terms of Service
</a>{" "}
and our{" "}
<a className="underline hover:text-foreground" href="#">
Privacy Policy
</a>
.
</p>
</div>
</CardContent>
</Card>
</div>
)
}npx shadcn@latest add https://blocks.so/r/login-06.jsonLogin Full Page with Icons
"use client"
import { ArrowRight, Eye, EyeOff, Lock, Mail } from "lucide-react"
import { type JSX, type SVGProps, useState } from "react"
import { Button } from "@/components/ui/button"
import { Checkbox } from "@/components/ui/checkbox"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { Separator } from "@/components/ui/separator"
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 Login07() {
const [isVisible, setIsVisible] = useState<boolean>(false)
const toggleVisibility = () => setIsVisible((prevState) => !prevState)
return (
<div className="flex min-h-dvh items-center justify-center">
<div className="mx-auto w-full max-w-xs space-y-6">
<div className="space-y-2 text-center">
<Logo className="mx-auto h-16 w-16" />
<h1 className="text-balance font-semibold text-3xl">Welcome back</h1>
<p className="text-pretty text-muted-foreground">
Sign in to access to your dashboard, settings and projects.
</p>
</div>
<div className="space-y-5">
<Button className="w-full justify-center gap-2" variant="outline">
<GoogleIcon className="h-4 w-4" />
Sign in with Google
</Button>
<div className="flex items-center gap-2">
<Separator className="flex-1" />
<span className="text-muted-foreground text-sm">
or sign in with email
</span>
<Separator className="flex-1" />
</div>
<div className="space-y-6">
<div>
<Label htmlFor="email">Email</Label>
<div className="relative mt-2.5">
<Input
className="peer ps-9"
id="email"
placeholder="ephraim@blocks.so"
type="email"
/>
<div className="pointer-events-none absolute inset-y-0 start-0 flex items-center justify-center ps-3 text-muted-foreground/80 peer-disabled:opacity-50">
<Mail aria-hidden="true" size={16} />
</div>
</div>
</div>
<div>
<div className="flex items-center justify-between">
<Label htmlFor="password">Password</Label>
<a className="text-primary text-sm hover:underline" href="#">
Forgot Password?
</a>
</div>
<div className="relative mt-2.5">
<Input
className="ps-9 pe-9"
id="password"
placeholder="Enter your password"
type={isVisible ? "text" : "password"}
/>
<div className="pointer-events-none absolute inset-y-0 start-0 flex items-center justify-center ps-3 text-muted-foreground/80 peer-disabled:opacity-50">
<Lock aria-hidden="true" size={16} />
</div>
<button
aria-controls="password"
aria-label={isVisible ? "Hide password" : "Show password"}
aria-pressed={isVisible}
className="absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md text-muted-foreground/80 outline-none transition-[color,box-shadow] hover:text-foreground focus:z-10 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"
onClick={toggleVisibility}
type="button"
>
{isVisible ? (
<EyeOff aria-hidden="true" size={16} />
) : (
<Eye aria-hidden="true" size={16} />
)}
</button>
</div>
</div>
<div className="flex items-center gap-2 pt-1">
<Checkbox id="remember-me" />
<Label htmlFor="remember-me">Remember for 30 days</Label>
</div>
</div>
<Button className="w-full">
Sign in
<ArrowRight className="h-4 w-4" />
</Button>
<div className="text-center text-sm">
No account?{" "}
<a className="font-medium text-primary hover:underline" href="#">
Create an account
</a>
</div>
</div>
</div>
</div>
)
}npx shadcn@latest add https://blocks.so/r/login-07.jsonLogin with SSO
"use client"
import { EyeIcon, EyeOffIcon, Key } from "lucide-react"
import Link from "next/link"
import { type JSX, type SVGProps, useState } from "react"
import { Button } from "@/components/ui/button"
import { Card, CardContent, CardFooter, CardHeader } from "@/components/ui/card"
import { Checkbox } from "@/components/ui/checkbox"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
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 SignIn() {
const [isPasswordVisible, setIsPasswordVisible] = useState<boolean>(false)
const togglePasswordVisibility = () => setIsPasswordVisible((prev) => !prev)
return (
<div className="flex min-h-dvh items-center justify-center">
<Card className="mx-4 w-full max-w-md pb-0 shadow-2xs">
<CardHeader className="mt-4 mb-2 space-y-1 text-center">
<div className="flex justify-center">
<Logo />
</div>
<div>
<h2 className="text-balance font-semibold text-2xl">
Sign in to Acme
</h2>
<p className="text-pretty text-muted-foreground text-sm">
Welcome back! Please enter your details.
</p>
</div>
</CardHeader>
<CardContent className="space-y-6">
<div className="space-y-2">
<Label htmlFor="email">Email address</Label>
<Input id="email" placeholder="ephraim@blocks.so" type="email" />
</div>
<div className="space-y-0">
<div className="mb-2 flex items-center justify-between">
<Label htmlFor="password">Password</Label>
<Link className="text-primary text-sm hover:underline" href="#">
Reset password
</Link>
</div>
<div className="relative">
<Input
className="pe-9"
id="password"
placeholder="Enter your password"
type={isPasswordVisible ? "text" : "password"}
/>
<button
aria-controls="password"
aria-label={
isPasswordVisible ? "Hide password" : "Show password"
}
aria-pressed={isPasswordVisible}
className="absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md text-muted-foreground/80 outline-none transition-[color,box-shadow] hover:text-foreground focus:z-10 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"
onClick={togglePasswordVisibility}
type="button"
>
{isPasswordVisible ? (
<EyeOffIcon aria-hidden="true" size={16} />
) : (
<EyeIcon aria-hidden="true" size={16} />
)}
</button>
</div>
</div>
<div className="flex items-center space-x-2">
<Checkbox defaultChecked id="remember" />
<Label className="font-normal text-sm" htmlFor="remember">
Remember me
</Label>
</div>
<div className="space-y-2">
<Button className="w-full" type="submit">
Sign In
</Button>
<Button className="w-full" type="button" variant="outline">
<Key className="mr-2 h-4 w-4" />
Single sign-on (SSO)
</Button>
</div>
</CardContent>
<CardFooter className="flex justify-center border-t py-4!">
<p className="text-pretty text-center text-muted-foreground text-sm">
New to Acme?{" "}
<Link className="text-primary hover:underline" href="#">
Sign up
</Link>
</p>
</CardFooter>
</Card>
</div>
)
}npx shadcn@latest add https://blocks.so/r/login-08.jsonLogin Signup with Role Selection
"use client"
import { BarChart, Code, Eye, EyeOff, User } from "lucide-react"
import Link from "next/link"
import { type JSX, type SVGProps, useState } from "react"
import { Button } from "@/components/ui/button"
import { Card, CardContent, CardFooter, CardHeader } from "@/components/ui/card"
import { Checkbox } from "@/components/ui/checkbox"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select"
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 SignupForm() {
const [showPassword, setShowPassword] = useState(false)
return (
<div className="flex min-h-dvh items-center justify-center">
<div className="w-full max-w-md">
<Card className="border-none pb-0 shadow-lg">
<CardHeader className="flex flex-col items-center space-y-1.5 pt-6 pb-4">
<Logo className="h-12 w-12" />
<div className="flex flex-col items-center space-y-0.5">
<h2 className="text-balance font-semibold text-2xl text-foreground">
Create an account
</h2>
<p className="text-pretty text-muted-foreground">
Welcome! Create an account to get started.
</p>
</div>
</CardHeader>
<CardContent className="space-y-6 px-8">
<div className="space-y-2">
<Label htmlFor="role">Role</Label>
<Select
defaultValue="designer"
items={{
designer: "Product Designer",
developer: "Developer",
manager: "Product Manager",
}}
>
<SelectTrigger
className="[&>span]:flex [&>span]:items-center [&>span]:gap-2 [&>span_svg]:shrink-0"
id="role"
>
<SelectValue placeholder="Select role" />
</SelectTrigger>
<SelectContent className="[&_*[role=option]>span>svg]:shrink-0 [&_*[role=option]>span]:start-auto [&_*[role=option]>span]:end-2 [&_*[role=option]>span]:flex [&_*[role=option]>span]:items-center [&_*[role=option]>span]:gap-2 [&_*[role=option]]:ps-2 [&_*[role=option]]:pe-8">
<SelectItem value="designer">
<User aria-hidden="true" size={16} />
<span className="truncate">Product Designer</span>
</SelectItem>
<SelectItem value="developer">
<Code aria-hidden="true" size={16} />
<span className="truncate">Developer</span>
</SelectItem>
<SelectItem value="manager">
<BarChart aria-hidden="true" size={16} />
<span className="truncate">Product Manager</span>
</SelectItem>
</SelectContent>
</Select>
</div>
<div className="grid grid-cols-2 gap-4">
<div className="space-y-2">
<Label htmlFor="firstName">First name</Label>
<Input id="firstName" />
</div>
<div className="space-y-2">
<Label htmlFor="lastName">Last name</Label>
<Input id="lastName" />
</div>
</div>
<div className="space-y-2">
<Label htmlFor="username">Username</Label>
<Input id="username" />
</div>
<div className="space-y-2">
<Label htmlFor="email">Email address</Label>
<Input id="email" type="email" />
</div>
<div className="space-y-2">
<Label htmlFor="password">Password</Label>
<div className="relative">
<Input
className="pr-10"
id="password"
type={showPassword ? "text" : "password"}
/>
<Button
className="absolute top-0 right-0 h-full px-3 text-muted-foreground hover:bg-transparent"
onClick={() => setShowPassword(!showPassword)}
size="icon"
type="button"
variant="ghost"
>
{showPassword ? (
<EyeOff className="h-4 w-4" />
) : (
<Eye className="h-4 w-4" />
)}
</Button>
</div>
</div>
<div className="flex items-center space-x-2">
<Checkbox id="terms" />
<label className="text-muted-foreground text-sm" htmlFor="terms">
I agree to the{" "}
<Link className="text-primary hover:underline" href="#">
Terms
</Link>{" "}
and{" "}
<Link className="text-primary hover:underline" href="#">
Conditions
</Link>
</label>
</div>
<Button className="w-full bg-primary text-primary-foreground">
Create free account
</Button>
</CardContent>
<CardFooter className="flex justify-center border-t py-4!">
<p className="text-pretty text-center text-muted-foreground text-sm">
Already have an account?{" "}
<Link className="text-primary hover:underline" href="#">
Sign in
</Link>
</p>
</CardFooter>
</Card>
</div>
</div>
)
}npx shadcn@latest add https://blocks.so/r/login-09.json