Split Sign-In With Brand Panel
7ovr/auth-2FreeBlock
Two-column sign-in pairing a dark brand panel that lists product features with a plain email and password form, no social login buttons.
Install it
npx shadcn@latest add https://7ovr.com/r/auth-2.jsonSource
1"use client"23import { useState } from "react"4import { toast } from "sonner"5import { z } from "zod"67import { Button } from "@/components/ui/button"8import { Checkbox } from "@/components/ui/checkbox"9import {10 Field,11 FieldDescription,12 FieldError,13 FieldGroup,14 FieldLabel,15} from "@/components/ui/field"16import { Input } from "@/components/ui/input"17import { Toaster } from "@/components/ui/sonner"18import { IconPlaceholder } from "@/components/icons/icon-placeholder"1920const BRAND = "Acme"21const TAGLINE = "Collaborative work, simplified."22const FEATURES = [23 "Real-time project dashboards",24 "Role-based access control",25 "Audit logs & compliance reports",26]2728const signInSchema = z.object({29 email: z30 .string()31 .min(1, "Email is required")32 .email("Enter a valid email address"),33 password: z.string().min(8, "Password must be at least 8 characters"),34})3536export default function AuthBlock() {37 const [errors, setErrors] = useState<Record<string, string>>({})3839 function handleSubmit(event: React.FormEvent<HTMLFormElement>) {40 event.preventDefault()41 const data = Object.fromEntries(new FormData(event.currentTarget))42 const result = signInSchema.safeParse(data)43 if (!result.success) {44 const next: Record<string, string> = {}45 for (const issue of result.error.issues) {46 const key = issue.path[0]47 if (typeof key === "string" && !next[key]) {48 next[key] = issue.message49 }50 }51 setErrors(next)52 return53 }54 setErrors({})55 toast.promise(new Promise((resolve) => setTimeout(resolve, 1400)), {56 loading: "Signing you in…",57 success: "Welcome back to Acme!",58 error: "Sign-in failed. Please try again.",59 })60 }6162 function clearError(name: string) {63 setErrors((prev) => {64 if (!prev[name]) return prev65 const next = { ...prev }66 delete next[name]67 return next68 })69 }7071 return (72 <section className="flex w-full items-center justify-center bg-background text-foreground">73 <Toaster />74 <div className="flex w-full max-w-4xl flex-col overflow-hidden rounded-xl md:flex-row">75 <div className="dark flex flex-col justify-between gap-10 bg-background px-10 py-12 text-foreground md:w-1/2">76 <div>77 <span className="text-xl font-bold tracking-tight">{BRAND}</span>78 </div>79 <div className="flex flex-col gap-6">80// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from 7ovr
All 241 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Mission Statement With Statsabout-1 | 7ovr | Blocks | Free | 1 dep | |
| Founder Story With Photoabout-2 | 7ovr | Blocks | Free | 1 dep | |
| Values Card Gridabout-3 | 7ovr | Blocks | Free | 1 dep | |
| Mission Vision Values Columnsabout-4 | 7ovr | Blocks | Free | 1 dep | |
| Recent Activity Cardactivity-1 | 7ovr | Blocks | Free | 1 dep | |
| Activity Grouped By Dayactivity-2 | 7ovr | Blocks | Free | 1 dep | |
| Audit Log With Icon Tilesactivity-3 | 7ovr | Blocks | Free | 1 dep | |
| Activity Tabs With Unreadactivity-4 | 7ovr | Blocks | Free | 1 dep |
