X Enterprises
nuxt-x-auth-stack

Form

Base form wrapper that provides the shared card and layout shell for Stack Auth page components.

Form

The XAuthForm component is the base form wrapper used internally by all Stack Auth page components. It renders the card, applies the configured layout, shows branding, and provides a consistent visual shell. Use it when building a custom auth page.

Components

<XAuthForm />

Wrap custom form content inside XAuthForm to inherit the shared auth layout. It renders provider buttons, a Zod-validated UForm from the fields definition, and a submit button.

<XAuthForm
  title="Verify Email"
  description="Check your inbox for a code"
  :fields="[{ name: 'code', label: 'Code', type: 'text', required: true }]"
  :submit="{ label: 'Verify' }"
  @submit="onSubmit"
/>

Props

PropTypeDefaultDescription
iconstringundefinedIconify icon shown above the title
titlestringundefinedHeading displayed above the form
descriptionstringundefinedSubheading below the title (overridden by the description slot)
fieldsarray[]Field definitions (name, label, type, placeholder, required) rendered as UFormField/UInput
providersarrayundefinedOAuth buttons above the form (label, icon, onClick)
separatorstringundefinedLabel of the divider between provider buttons and the form
submitobject{ label: 'Continue' }Submit button configuration
schemaobjectundefinedZod schema passed to UForm for validation

Emits

EventDescription
submitEmitted with the UForm submit event payload when the form validates

Slots

SlotDescription
descriptionCustom content below the title (overrides the description prop)
leadingContent between the provider buttons and the form fields
password-hintHint shown on password fields (e.g. a "Forgot password?" link)
submitCustom submit button content
footerContent below the form (e.g. links to other auth pages)

AI Context

component: XAuthForm
package: "@xenterprises/nuxt-x-auth-stack"
use-when: Building a custom auth page for Stack Auth that needs the shared card/layout shell
Copyright © 2026