SignInForm
Email and password sign-in with show/hide password, "keep me signed in", optional provider buttons (OAuth), and loading and error states.
Sign in
or use your email
Try the password wrong-password to see the error state.
Accessibility. A labelled form in a section named by its heading (level is a prop). Fields have real labels, autocomplete tokens (username, current-password) and aria-invalid + aria-describedby errors. A failed submit moves focus to an error summary whose links jump to each field; a server failure is announced as an alert. While loading the button sets aria-busy and ignores clicks without being disabled, so focus is not lost.
Code
import { SignInForm } from '$lib/modules';
<SignInForm
providers={[{ id: 'github', label: 'Continue with GitHub' }]}
loading={busy}
error={failure}
forgotHref="/reset"
signUpHref="/sign-up"
on:submit={(e) => signIn(e.detail)}
on:provider={(e) => startOAuth(e.detail.id)}
/>