MindeesUI
Blocks

Auth blocks

Eight accessible authentication blocks for sign in, sign up, password recovery, OTP verification, social login, and session handling. Pure UI, props-driven.

Authentication flows composed from MindeesUI form primitives. Every block is pure UI — credentials and actions flow through onSubmit callbacks; nothing is fetched, validated against a server, or stored.

Import

import {
  LoginForm,
  SignupForm,
  ForgotPasswordForm,
  ResetPasswordForm,
  OTPVerification,
  SocialLoginButtons,
  LogoutConfirmation,
  SessionExpiredModal,
} from '@mindees/blocks';

Usage

<LoginForm
  loading={pending}
  error={error}
  onSubmit={({ email, password }) => signIn(email, password)}
  onForgotPassword={() => navigate('forgot')}
  footer={<SocialLoginButtons providers={providers} />}
/>

Blocks

LoginForm

Email + password form with an optional "Forgot password?" link and a footer slot.

PropTypeDescription
onSubmit(values: LoginFormValues) => voidCalled with the trimmed email and raw password on submit.
loadingbooleanDisables inputs and shows a spinner on the submit button.
errorstringTop-level error message, announced to assistive tech.
onForgotPassword() => voidShows a "Forgot password?" link when provided.
footerReactNodeSlot below the submit button, e.g. a SocialLoginButtons row.
submitLabelstringSubmit button label. Defaults to "Sign in".

SignupForm

Name, email, password, confirm-password, and terms checkbox. Submits a SignupFormValues object.

PropTypeDescription
onSubmit(values: SignupFormValues) => voidCalled with the collected values on submit.
loadingbooleanDisables inputs and shows a spinner on the submit button.
errorstringTop-level error message, announced to a11y.
termsLabelReactNodeLabel rendered next to the terms checkbox.
submitLabelstringSubmit button label. Defaults to "Create account".

ForgotPasswordForm

Email field that flips to a success confirmation via the sent flag.

PropTypeDescription
onSubmit(values: ForgotPasswordFormValues) => voidCalled with the trimmed email on submit.
loadingbooleanDisables inputs and shows a spinner.
errorstringTop-level error message.
sentbooleanRenders the success confirmation instead of the form.
onBack() => voidShows a "Back to sign in" link when provided.
submitLabelstringSubmit label. Defaults to "Send reset link".
sentMessagestringMessage shown in the sent state.

ResetPasswordForm

New-password + confirm-password form for completing a reset.

PropTypeDescription
onSubmit(values: ResetPasswordFormValues) => voidCalled with the new password and its confirmation.
loadingbooleanDisables inputs and shows a spinner.
errorstringTop-level error message.
submitLabelstringSubmit label. Defaults to "Reset password".

OTPVerification

Segmented one-time-code field with auto-verify and a resend link.

PropTypeDescription
onVerify(code: string) => voidCalled with the entered code on verify or auto-complete.
onResend() => voidShows a "Resend code" link when provided.
lengthnumberNumber of code digits. Defaults to 6.
loadingbooleanDisables input and shows a spinner on verify.
errorstringTop-level error message.
titlestringHeading above the code field.
descriptionstringSupporting line under the heading.
verifyOnCompletebooleanVerify when the final digit is entered. Defaults to true.
submitLabelstringVerify button label. Defaults to "Verify".

SocialLoginButtons

Renders a list of SSO providers as a vertical column or a grid.

PropTypeDescription
providersreadonly SocialProvider[]Providers (key, label, icon?, onPress, disabled?).
layout'vertical' | 'grid'Single column or multi-column grid. Defaults to 'vertical'.
columnsnumberColumn count when layout is 'grid'. Defaults to 2.
disabledbooleanDisable every provider button.

LogoutConfirmation

Destructive confirmation dialog wrapping ConfirmationDialog.

PropTypeDescription
visiblebooleanControls visibility.
onConfirm() => voidCalled when the user confirms sign-out.
onCancel() => voidCalled on cancel, backdrop, or hardware back.
titlestringDialog title. Defaults to "Sign out?".
messagestringSupporting message under the title.
confirmLabelstringConfirm label. Defaults to "Sign out".
cancelLabelstringCancel label. Defaults to "Cancel".

SessionExpiredModal

Re-authentication dialog; becomes non-dismissible when onDismiss is omitted.

PropTypeDescription
visiblebooleanControls visibility.
onReauthenticate() => voidCalled when the user chooses to sign in again.
onDismiss() => voidDismiss handler; when omitted the modal is non-dismissible.
titlestringDialog title. Defaults to "Session expired".
descriptionstringSupporting message under the title.
reauthenticateLabelstringRe-auth button label. Defaults to "Sign in again".
dismissLabelstringDismiss button label. Only shown when onDismiss is provided.

All blocks also accept a style prop spread onto the root container.

On this page