LoginWithEmail
An email/password sign-in form that takes a custom submit handler.
Installation
pnpm dlx shadcn@latest add @chelone/login-with-emailAn email/password sign-in form that takes a custom submit handler.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | Extra class names applied to the `<form>` element. |
| loading | boolean | — | Disables the button and shows a spinner from outside the form. |
| onSubmit | (values: LoginWithEmailValues) => void | Promise<void> | — | Called with the credentials instead of `authProvider.login`. A rejection is shown as an error notification. |
| redirectTo | string | — | Path the user is redirected to after a successful sign in. Passed to `authProvider.login`; ignored when `onSubmit` is set. |
| submitLabel | string | — | Button text. Defaults to the translated `ra.auth.sign_in`. |