Staaarter

Centered Sign In Card

A full-height, centered sign-in screen: social login buttons up top, an email and password form below with a show/hide password toggle and a remember-me checkbox, plus a forgot-password link. Ideal as a standalone auth page.

By Staaarter Team
Auth
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/centered-sign-in-card.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/auth/auth1.tsx instead.

Usage

The file also exports auth1Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Auth1, auth1Demo } from "@/components/blocks/auth/auth1";

export default function Page() {
  return <Auth1 {...auth1Demo} />;
}

Props

PropTypeDefaultDescription
headingstring"Welcome back"Card heading.
descriptionstring"Sign in to your account to continue."Short subheading under the heading.
forgotPasswordHrefstring"#"Link target for the Forgot password action.
signUpHrefstring"#"Link target for the Sign up action.
classNamestringnoneExtra classes for the outer section element.

Behavior notes

  • The show/hide password toggle is real client-side state: clicking the eye icon switches the input between type="password" and type="text".
  • The Google and GitHub buttons, the remember-me checkbox, and the form submit are decorative only, nothing is sent anywhere and no account is created.
  • Forgot password and Sign up render as real Next.js Link components via the button's render prop, but both default to "#" until you supply your own hrefs.