Docs
Login Page

Login Page

A beautiful Login Page with hookform designed for your web application, used by only copy and paste.

Installation

This section includes not only UI, but also some form processing. And the github or google login can be used directly.

Install the following dependencies:

npm install @hookform/resolvers react-hook-form zod

Install the shadcn/ui dependencies:

You need to install shadcn components, like this:

npx shadcn@latest add input button card label toast

Copy and paste the code into your project.

Usage

The component does not depend on an auth library. Pass your own handlers, for example with NextAuth.js:

"use client"
 
import { signIn } from "next-auth/react"
 
import LoginPage from "@/components/login"
 
export default function Page() {
  return (
    <LoginPage
      onProviderSignIn={(provider) => signIn(provider)}
      onEmailSignIn={(email) => signIn("email", { email })}
    />
  )
}