Skip to main content

Interface: RegisterFormProps

Defined in: components/RegisterForm.tsx:15

Properties

afterRegistration?

optional afterRegistration?: (user, accessToken?, refreshToken?, expiresAt?, anonymousCart?) => void

Defined in: components/RegisterForm.tsx:85

Callback after the user is registered. anonymousCart is the cart held in the parent's state at the moment of submission, forwarded so the parent can merge it into the new user's cart.

Parameters

user

Contact | Customer

accessToken?

string

refreshToken?

string

expiresAt?

string

anonymousCart?

Cart | null

Returns

void


automaticLogin?

optional automaticLogin?: boolean

Defined in: components/RegisterForm.tsx:61

When true (default) the new contact/customer is automatically logged in after registration: the SDK access token is set on the GraphQL client and forwarded to afterRegistration so the parent can populate auth state. When false, registration completes server-side but no session is kept; afterRegistration is called without tokens so the parent can redirect the user to the login page.

Default

true

beforeRegistration?

optional beforeRegistration?: () => void

Defined in: components/RegisterForm.tsx:79

Callback before the registration process starts

Returns

void


buttonText?

optional buttonText?: string

Defined in: components/RegisterForm.tsx:32

Label for the submit button

Default

"Register"

cart?

optional cart?: Cart | null

Defined in: components/RegisterForm.tsx:94

Anonymous cart snapshot from the parent's state — forwarded to afterRegistration.


countries?

optional countries?: Record<string, string>

Defined in: components/RegisterForm.tsx:114

List of countries to display in the country dropdown

Default

{}

optional displayLoginLink?: boolean

Defined in: components/RegisterForm.tsx:102

Show/hide the login link

Default

true

graphqlClient?

optional graphqlClient?: GraphQLClient

Defined in: components/RegisterForm.tsx:17

GraphQL client for the Propeller SDK. Resolved from PropellerProvider when omitted.


labels?

optional labels?: Record<string, string>

Defined in: components/RegisterForm.tsx:76

Labels for the registration form fields.

Available keys:

  • firstName, middleName, lastName, email, password, confirmPassword
  • phone, gender, companyName, vatNumber, cocNumber
  • street, number, numberExtension, postalCode, city, country
  • userTypeLabel, contactLabel, customerLabel
  • emailPlaceholder, passwordPlaceholder, passwordMismatch
  • billingAddressTitle, deliveryAddressTitle, sameAsDelivery
  • loginText, loginLink
  • personalDetailsTitle, passwordTitle

onLoginClick?

optional onLoginClick?: () => void

Defined in: components/RegisterForm.tsx:97

Action for the login link click

Returns

void


preferredLanguage?

optional preferredLanguage?: string

Defined in: components/RegisterForm.tsx:108

Prefered language

Default

'NL'

requiredFields?

optional requiredFields?: string[]

Defined in: components/RegisterForm.tsx:50

Required fields for the registration form. Available field names: firstName, middleName, lastName, email, password, phone, mobile, gender, companyName, vatNumber, cocNumber, street, number, numberExtension, postalCode, city, country

Default

[]

showUserType?

optional showUserType?: "Contact" | "Customer" | null

Defined in: components/RegisterForm.tsx:41

Enable choosing between Contact or Customer if null, otherwise proceed with one user type registration only. 'Contact' = Company account (has company name, VAT, CoC fields) 'Customer' = Consumer/personal account

Default

null

subtitle?

optional subtitle?: string

Defined in: components/RegisterForm.tsx:27

Subtitle of the register form

Default

""

title?

optional title?: string

Defined in: components/RegisterForm.tsx:22

Title of the register form

Default

"Create account"