Login

Headless auth screens for Vue 3. They emit submit / social and never fetch — sessions, CSRF tokens, OAuth SDKs, and lockout copy stay in the app. Docs demos set :framed="false" so the cover shell does not steal the layout; apps use the default framed glass card.

VdLogin

Sign in

VdSignUp

Create an account

VdForgotPassword

Reset password

OTP + checkbox

VdOtpInput paste-fills digits and marks the first cell autocomplete="one-time-code". VdCheckbox is the boolean control (remember-me / terms); use VdCheckboxGroup for named sets.

Value: ∅

Usage
<script setup lang="ts">
import { VdLogin } from "@vanduo-oss/vd3";
const onSubmit = ({ identifier, password, remember }) => {
  // App-owned: fetch, CSRF, session. The kit never calls the network.
};
</script>

<template>
  <VdLogin
    avatar-initials="VD"
    :providers="[{ id: 'github', label: 'GitHub', icon: 'github-logo' }]"
    @submit="onSubmit"
    @social="(id) => signInWith(id)"
  >
    <template #extra>
      <input type="hidden" name="_csrf" value="app-token" />
    </template>
    <template #links>
      <a href="/forgot">Forgot password?</a>
      <a href="/signup">Create an account</a>
    </template>
  </VdLogin>
</template>

VdLogin API

Prop / slot / eventDescription
:identifierType'email' | 'text' (default 'email'). Sets type + autocomplete.
:identifierLabel / :passwordLabel / :submitLabel / :rememberLabelVisible field copy.
:rememberShow the remember-me VdCheckbox (default true).
:loadingSubmit button loading spinner.
:error / :messageParent-provided copy rendered with VdAlert (danger / success).
:providers{ id, label, icon? }[] — ghost buttons that emit social with id.
:title / :glass / :elevated / :framedForwarded to VdAuthCard (slots #brand, #title, #alert, default, #footer). Docs demos set framed false.
:avatarSrc / :avatarInitialsOptional VdAvatar in the brand slot (display only).
#extra / #links / #brandHidden CSRF (inside the form), footer links, brand override.
@submit{ identifier, password, remember } — no network I/O.
@socialProvider id string. Does not submit the form.

VdSignUp API

Prop / slot / eventDescription
:nameLabel / :emailLabel / :passwordLabel / :confirmLabel / :termsLabel / :submitLabelVisible copy.
:requireTermsBlock submit until the terms VdCheckbox is checked (default true).
:loading / :error / :message / :title / :glass / :elevated / :framedSame as VdLogin.
:avatarSrc / :avatarInitialsDisplay-only VdAvatar in the brand slot.
#extra / #links / #brandSame slot contract as VdLogin.
@submit{ name, email, password, terms }. Suppressed when confirm does not match (useValidate match message).

VdForgotPassword API

Prop / slot / eventDescription
:emailLabel / :submitLabelVisible copy.
:loading / :error / :message / :title / :glass / :elevated / :framedSame shell as VdLogin.
#extra / #links / #brandSame slot contract as VdLogin.
@submit{ email }.

VdOtpInput API

PropDescription
v-model (modelValue)Joined digit string.
:lengthCell count (default 6).
:disabled / :name / :id / :labelledByForwarded; autocomplete=one-time-code on the first cell.

VdCheckbox API

PropDescription
v-model (modelValue)Boolean checked state.
:labelAssociated label (or the default slot).
:size'sm' | 'md' | 'lg' (default 'md').
:disabled / :name / :idForwarded to the native checkbox.

VdAuthCard API

Prop / slotDescription
:titlestring (default "") — heading text rendered in .vd-auth-heading when #title is not overridden.
:glassboolean (default true) — enables frosted glass card treatment when framed.
:elevatedboolean (default true) — enables elevated card shadow when framed.
:framedboolean (default true) — wraps the card in VdCover + VdCenter (max="fib-377"). When false, renders a bare VdStack for embedding inside existing containers.
#brandOptional brand/avatar header slot (.vd-auth-brand).
#titleOptional custom title slot (.vd-auth-title); overrides :title.
#alertOptional alert banner slot (.vd-auth-alert) above the form.
defaultMain authentication form or body content.
#footerOptional footer links/actions slot (.vd-auth-footer).
Accessibility
  • All form inputs bind explicit <label> elements, appropriate autocomplete tokens (username, email, current-password, new-password), and aria-invalid / aria-describedby validation states via useValidate.
  • Error and status banners render inside VdAlert with role="alert" so assistive technologies announce authentication failures immediately.
  • VdOtpInput renders a role="group" with per-digit aria-label="Digit {i} of {length}", inputmode="numeric", autocomplete="one-time-code" on the first cell, arrow key navigation, and multi-digit paste distribution.