// Generated by scripts/generate-showcase.mjs. Do not edit directly. page AuthFormDetail { layout = "showcase" state playground_size = ctx.url.searchParams.get("pg_size") ?? "default" state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary" state playground_mode = ctx.url.searchParams.get("pg_mode") ?? "sign-in" state playground_action = ctx.url.searchParams.get("pg_action") ?? "#auth-form-demo" state playground_method = ctx.url.searchParams.get("pg_method") ?? "post" state playground_title = ctx.url.searchParams.get("pg_title") ?? "Auth Form example" state playground_description = ctx.url.searchParams.get("pg_description") ?? "A polished default auth form for a modern application." state playground_returnTo = ctx.url.searchParams.get("pg_returnTo") ?? "" state playground_schema = ctx.url.searchParams.get("pg_schema") ?? "" state playground_showRemember = (ctx.url.searchParams.get("pg_showRemember") ?? "true") === "true" state playground_showName = (ctx.url.searchParams.get("pg_showName") ?? "true") === "true" state playground_submitLabel = ctx.url.searchParams.get("pg_submitLabel") ?? "Auth Form" state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1" seo { title = "Auth Form" description = "Reusable auth form component." } view {
Core component

Auth Form

Reusable auth form component.

13 props1 slots5 outputsTheme readyResponsive
Interactive playground

Configure Auth Form

Change any prop and inspect the server-rendered component immediately.

Live preview
Component code
<AuthForm
  action="#auth-form-demo"
  title="Auth Form example"
  description="A polished default auth form for a modern application."
  submitLabel="Auth Form"
/>
Event outputInteract with the preview to inspect the typed payload.
Component props13 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Recommended

Production default

Balanced spacing, hierarchy, and content for the most common product workflow.

01
Live preview
Component usage.wrn
<AuthForm
  action="#auth-form-demo"
  title="Auth Form example"
  description="A polished default auth form for a modern application."
  submitLabel="Auth Form"
/>
Dense UI

Compact application

A tighter variation for dashboards, side panels, tables, and operational interfaces.

02
Live preview
Component usage.wrn
<AuthForm
  size="sm"
  action="#auth-form-demo"
  title="Compact Auth Form"
  description="A compact configuration for dashboards and dense product surfaces."
  submitLabel="Compact example"
/>
Extended

Rich configuration

A more expressive variation using additional data, stronger emphasis, and optional states.

03
Live preview
Component usage.wrn
<AuthForm
  size="lg"
  action="#auth-form-demo"
  title="Advanced Auth Form"
  description="A richer configuration demonstrating additional content and hierarchy."
  submitLabel="Advanced example"
/>
Component outputs

Receive every typed component output

Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.

@submitFires when the component emits the submit event.
@changeFires when the component's committed value or selection changes.
@inputFires as the editable value changes.
@focusFires when the interactive control receives focus.
@blurFires when focus leaves the interactive control.
Declarative handlers.wrn
<AuthForm
  @submit='console.log(payload)'
  @change='console.log(payload)'
  @input='console.log(payload)'
  @focus='console.log(payload)'
  @blur='console.log(payload)'
/>
Direct output handlers.js
import { registerOutputHandler } from "@wrnexus/csr/outputs"

const component = document.querySelector("[data-ui-component=\"AuthForm\"], [data-component=\"AuthForm\"]")

if (component) registerOutputHandler(component, "submit", (payload) => {
  console.log("submit", payload)
})

if (component) registerOutputHandler(component, "change", (payload) => {
  console.log("change", payload)
})

if (component) registerOutputHandler(component, "input", (payload) => {
  console.log("input", payload)
})

if (component) registerOutputHandler(component, "focus", (payload) => {
  console.log("focus", payload)
})

if (component) registerOutputHandler(component, "blur", (payload) => {
  console.log("blur", payload)
})
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
sizestring"default"No
colorstring"primary"No
modestring"sign-in"No
actionstring"/api/auth/login"No
methodstring"post"No
titlestring"Sign in"No
descriptionstring""No
returnTostring""No
schemastring""No
showRememberbooleantrueNo
showNamebooleantrueNo
submitLabelstring"Continue"No
classstring""No
} }