Wocha Docs

SignUp

Styled registration form with social providers and hosted sign-up redirect.

The <SignUp> component renders a registration card that redirects users to Wocha hosted sign-up. It shares the same styling and layout system as <SignIn>.

Installation

pnpm add @wocha/ui @wocha/react
Or scaffold with the CLI
npx @wocha/cli init --framework nextjs
import { SignUp } from "@wocha/ui";
import "@wocha/ui/styles.css";

Basic usage

import { WochaProvider } from "@wocha/react";
import { WochaThemeProvider, SignUp } from "@wocha/ui";
 
<WochaProvider config={config}>
  <WochaThemeProvider>
    <SignUp redirectUrl="/welcome" />
  </WochaThemeProvider>
</WochaProvider>

Props

PropTypeDefaultDescription
redirectUrlstringURL to redirect to after successful registration
organisationstringOrganisation ID hint for the hosted registration page
providersSocialProvider[]["google", "github", "microsoft", "apple"]Social sign-up buttons to display
appearanceWochaAppearanceVisual customisation for this component
withCardbooleantrueWrap content in AuthCard with default branding
titleReactNode"Create your account"Card title override
descriptionReactNode"Get started…"Card description override
buttonLabelstring"Continue with email"Primary button label
classNamestringAdditional class name on the root element
fallbackReactNodeShown while auth context is loading

Layout options

<SignUp
  title="Join Acme Corp"
  appearance={{
    options: {
      socialButtonsPlacement: "bottom",
      termsPageUrl: "/terms",
      privacyPageUrl: "/privacy",
    },
  }}
/>

Theming

import { shadcn } from "@wocha/ui/themes";
 
<WochaThemeProvider appearance={{ theme: shadcn, signUp: { radius: "lg" } }}>
  <SignUp />
</WochaThemeProvider>

Framework notes

FrameworkProvider setup
React SPAWochaProvider + WochaThemeProvider
Next.js App RouterWochaSessionProvider + WochaThemeProvider sdk="nextjs"

On this page