Account Chooser
A full-height account picker screen: a list of saved accounts, each showing an avatar with an initials fallback, a name, and an email, followed by a Use another account row with a plus icon. A static, server-rendered block with no client-side state.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, avatar, avatar-initials dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/account-chooser.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/auth/auth7.tsx instead.
Usage
The file also exports auth7Demo, 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 { Auth7, auth7Demo } from "@/components/blocks/auth/auth7"; export default function Page() { return <Auth7 {...auth7Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Choose an account" | Screen heading. |
| description | string | "Select an account to continue signing in." | Short description shown under the heading. |
| accounts | SavedAccount[] | none | Saved accounts rendered as rows, in the order passed in. |
| addAccountLabel | string | "Use another account" | Label on the bottom row. |
| addAccountHref | string | "#" | Link target for the Use another account row. |
| className | string | none | Extra classes for the outer section element. |
Types
type SavedAccount = { name: string; email: string; avatar?: { src: string; alt: string }; href?: string; };
Behavior notes
- Each account row and the Use another account row render as real Next.js Link components via the button's render prop, but none of them navigate anywhere real by default (href defaults to "#").
- Avatars fall back to initials generated from the account's name whenever avatar.src is missing or fails to load, using the shared Avatar/AvatarFallback components.
- This block is a plain server component: rows are styled to look clickable and hoverable, but clicking one does not actually sign in as that account.
More Auth Blocks
View all →centered-sign-in-card
Centered Sign In Card
Full-height centered sign-in card with social buttons, a password show/hide toggle, and remember-me.
split-screen-sign-up
Split-Screen Sign Up
Two-column registration screen with a sign-up form on one side and a full-bleed photo with a customer quote on the other.
email-verification-code
Email Verification Code
Full-height OTP screen with a 6-digit segmented code input, auto-advancing focus, and a live resend countdown.
forgot-password-request
Forgot Password Request
Full-height password recovery screen with a single email field, a send-reset-link button, and a back-to-sign-in link.
set-new-password
Set New Password
Full-height reset-password screen with independent show/hide toggles per field and a live password-requirements checklist.
magic-link-sign-in
Magic Link Sign In
Full-height passwordless sign-in screen with an email field, a send-magic-link button, and social login as a fallback.