Components

LoginForm

A complete login form component with email/password fields, locale select, remember me, reCAPTCHA slot, and footer links.

Usage

Use the MeLoginForm component to render a full login form with built-in validation, configurable labels, and customizable slots for title, description, footer, and reCAPTCHA.

Loading preview...
<template>
  <MeLoginForm
    title="Sign in"
    description="Enter your credentials to continue."
  />
</template>

The header section includes an optional locale selector, a title, and a description. Each can be customized via props or slots.

Custom Title & Description

Use title and description props or their named slots for full control.

<template>
  <MeLoginForm
    title="Welcome back"
    description="Please sign in to your account."
  />
</template>

Locale Select

The locale selector is hidden by default. Set showLocaleSelect to true to show it and pass a locales array (empty by default — you must populate it with the languages you want to offer). Use localePlaceholder to customize the placeholder text.

<template>
  <MeLoginForm
    show-locale-select
    :locales="[
      { code: 'pt-BR', name: 'Português', dir: 'ltr', messages: {} },
      { code: 'en-US', name: 'English', dir: 'ltr', messages: {} }
    ]"
    title="Sign in"
  />
</template>

Remember Me & Forgot Password

The remember me checkbox and forgot password link appear in the same row below the password field. Customize their labels and href via props.

<template>
  <MeLoginForm
    remember-me-label="Keep me logged in"
    forgot-password-label="Reset password"
    forgot-password-href="/reset"
  />
</template>

The footer displays sign up and help links. Use props to change the labels or slots for full customization.

<template>
  <MeLoginForm
    sign-up-href="/register"
    help-href="/support"
  />
</template>

Loading State

Pass the loading prop to disable the form and show a loading indicator on the submit button.

<template>
  <MeLoginForm
    loading
    title="Sign in"
  />
</template>

API

Props

PropDefaultType
title'Sign in'string
The title displayed in the form header.
description''string
The description displayed below the title.
showLocaleSelectfalseboolean
Show or hide the locale selector in the header.
localePlaceholder'Language'string
Placeholder text for the locale selector.
locales[]MeLoginFormLocaleItem[]
Array of locale objects (code, name, dir, messages) for the locale selector. Empty by default; the user must populate it.
rememberMeLabel'Remember me'string
Label for the remember me checkbox.
forgotPasswordLabel'Forgot your password?'string
Label for the forgot password link.
forgotPasswordHref'#/forgot-password'string
URL for the forgot password link.
signUpHref'#/signup'string
URL for the sign up link.
helpHref'#/help'string
URL for the help link.
showRecaptchaPlaceholdertrueboolean
Show a placeholder when no reCAPTCHA is provided via slot.
loadingfalseboolean
Disables the form and shows a loading state on the submit button.

Slots

SlotDescription
titleCustom content for the form title.
descriptionCustom content for the form description.
recaptchaInject a reCAPTCHA widget (replaces the placeholder).
footerReplace the entire footer section.
signup-textCustom content for the sign up paragraph.
help-textCustom content for the help paragraph.

Events

EventType
submit[payload: { email: string, password: string, rememberMe?: boolean }]
forgotPassword[]
signUp[]
help[]