Signup Form
BlockBasic Usage
Loading...
Installation
pnpm add @corew500/uiUsage
import { SignupForm } from "@corew500/ui/blocks/signup-form"
<SignupForm>Content</SignupForm>API Reference
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| action* | SignUpAction | — | Server action for signing up. Import from '@corew500/feature-auth/server' and pass as prop. @example ```tsx import { SignupForm } from '@corew500/feature-auth' import { signUp } from '@corew500/feature-auth/server' export default function Page() { return <SignupForm action={signUp} signInHref="/login" /> } ``` |
| validation | AuthValidationOptions | — | Validation configuration |
| locale | string | — | Locale for i18n-aware redirects |
| redirectTo | string | — | Custom email redirect URL for confirmation |
| metadata | Record<string, unknown> | — | Additional metadata to pass to signup |
| onSuccess | (data: SignupSuccessData) => void | Promise<void> | — | Called after successful signup. Can be async - the form will await completion. |
| onAuthError | (error: AuthFormError) => void | — | Called when signup fails. Receives the error code (if available) and message. |
| onSubmitStart | () => void | — | Called immediately before the form submits. Useful for analytics, global loading states, or last-minute checks. |