App, sign in


Install
npx shadcn add @klarhimmel/app-auth-signinDetailsAbout, usage, props and more
Sign in with email and password, or email and a code (signInWith code, with optional Continue with Google and Continue with Microsoft buttons, each in its provider…
Import
Import
- app/auth-signin
- About
- Sign in with email and password, or email and a code (signInWith code, with optional Continue with Google and Continue with Microsoft buttons, each in its provider colour mark): labelled fields with the right autocomplete, a button that…
- Category
- Interface sections for signed-in products. New project? Set it up once: /get-started/installation.
Notes
When to use it
The standard email and password sign-in form. If the person has forgotten the password, app-auth-reset is the follow-up; for a new account use app-auth-signup.
Writing for it
- emailLabel and passwordLabel are required, 40 characters at most; write Email address and Password, not instructions, because they are the field names read aloud.
- The password field has a show and hide button whose words come from showLabel and hideLabel (30 each). Make them different words, so the state is clear to someone not seeing the icon.
- alternative pairs a question of up to 80 characters with a link, such as No account yet? and Create one, and sits under the form.
Watch out for
It never submits unless the host supplies an action or handles the submit. The error banner is not tied to a field: messages.error (160) must say what went wrong in general, because the fields are only described by that banner.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
Props
The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.
| Prop | Type | Default | Description |
|---|---|---|---|
signInWith | 'password' | 'code' | - | One of 'password', 'code'. Optional; empty is not rendered. |
google | Link | {…} | Optional; empty is not rendered. |
microsoft | Link | {…} | Optional; empty is not rendered. |
orLabel | string | 'or' | Text, up to 20 characters. Optional; empty is not rendered. |
eyebrow | string | 'Name the section' | Text, up to 60 characters. Optional; empty is not rendered. |
title | string | 'Sign in' | Text, up to 120 characters. |
description | string | 'Say which details to use to get in.' | Text, up to 300 characters. Optional; empty is not rendered. |
emailLabel | string | 'Email address' | Text, up to 40 characters. |
passwordLabel | string | 'Password' | Text, up to 40 characters. |
showLabel | string | 'Show password' | Text, up to 30 characters. |
hideLabel | string | 'Hide password' | Text, up to 30 characters. |
forgot | Link | {…} | See the type. |
submit | string | 'Sign in' | Text, up to 30 characters. |
sending | string | 'Signing in…' | Text, up to 30 characters. |
alternative | { text, link } | {…} | Fields: text, link. |
state | 'idle' | 'sending' | 'error' | 'idle' | One of 'idle', 'sending', 'error'. |
messages | { error } | {…} | Fields: error. |
action | string | - | Text, up to 300 characters. Optional; empty is not rendered. |
method | 'post' | 'get' | - | One of 'post', 'get'. Optional; empty is not rendered. |
hidden | { } | - | Optional; empty is not rendered. |
captcha | boolean | - | Optional; empty is not rendered. |
captchaSitekey | string | - | Text, up to 100 characters. Optional; empty is not rendered. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |