Skip to main content

Overview

SignUp component is a user interface element for handling user sign-up. It includes steps for sign-up, email verification, and provides callbacks for handling sign-up completion and navigation to sign-in page.
You can not customize this component layout structure, design or content.
<SignUp /> component first step

<SignUp /> component first step


<SignUp /> component verify step

<SignUp /> component verify step

Props

onComplete
callback
required
A callback function that is called when the sign-up process is successfully completed.
onSignInClick
callback
An optional callback function that is called when the user clicks the sign-in link.

Example Usage

Reference:
sign-up.tsx

'use client';

import { useCallback } from 'react';
import { useRouter } from 'next/navigation';

import { SignUp } from "@locai1/iam-react";

import { HOME_PAGE, SIGN_IN_PAGE } from '@/const';

export const SignUpComponent = () => {
  const { push } = useRouter();

  const handleSignUpComplete = useCallback(() => {
    push(HOME_PAGE);
  }, []);

  const handleSignInClick = useCallback(() => {
    push(SIGN_IN_PAGE);
  }, []);

  return (
    <div className="flex items-center justify-center min-h-screen bg-gray-100">
      <SignUp
        onComplete={handleSignUpComplete}
        onSignInClick={handleSignInClick}
      />
    </div>
  );
};