Skip to main content

Create Organization Block

The CreateOrganization Component is a fully customizable and accessible organization registration form built with React and TypeScript. It provides a complete business registration interface with form validation, multi-section organization, and flexible customization options.


๐Ÿš€ Installationโ€‹

npm install @nodeblocks/frontend-create-organization-block

๐Ÿ“– Usageโ€‹

import {CreateOrganization} from '@nodeblocks/frontend-create-organization-block';
Live Editor
function BasicCreateOrganization() {
  return (
    <CreateOrganization
      onCreateOrganization={(formData) => {
        console.log('Organization created:', formData);
      }}>
      <CreateOrganization.Title>Create Your Organization</CreateOrganization.Title>
      <CreateOrganization.Description>
        Please fill out the form below to register your organization
      </CreateOrganization.Description>
      <CreateOrganization.Form>
        <CreateOrganization.Form.AccountHolder>
          <CreateOrganization.Form.AccountHolder.SectionTitle>
            Account Holder Information
          </CreateOrganization.Form.AccountHolder.SectionTitle>
          <CreateOrganization.Form.AccountHolder.Name />
          <CreateOrganization.Form.AccountHolder.Email />
          <CreateOrganization.Form.AccountHolder.Contact />
        </CreateOrganization.Form.AccountHolder>
        <CreateOrganization.Form.CompanyInformation>
          <CreateOrganization.Form.CompanyInformation.SectionTitle>
            Company Information
          </CreateOrganization.Form.CompanyInformation.SectionTitle>
          <CreateOrganization.Form.CompanyInformation.CompanyName />
          <CreateOrganization.Form.CompanyInformation.PostCode />
          <CreateOrganization.Form.CompanyInformation.Prefecture selectOptionValues={[
            {value: 'tokyo', label: 'Tokyo'},
            {value: 'osaka', label: 'Osaka'}
          ]} />
          <CreateOrganization.Form.CompanyInformation.City />
          <CreateOrganization.Form.CompanyInformation.TownAddress />
          <CreateOrganization.Form.CompanyInformation.RepresentativePersonName />
          <CreateOrganization.Form.CompanyInformation.RepresentativeContact />
          <CreateOrganization.Form.CompanyInformation.CompanyCapital selectOptionValues={[
            {value: '1m-10m', label: '1M - 10M JPY'},
            {value: '10m-100m', label: '10M - 100M JPY'}
          ]} />
          <CreateOrganization.Form.CompanyInformation.CompanySize selectOptionValues={[
            {value: '1-10', label: '1-10 employees'},
            {value: '11-50', label: '11-50 employees'}
          ]} />
          <CreateOrganization.Form.CompanyInformation.HomePageUrl />
          <CreateOrganization.Form.CompanyInformation.AdditionalInformation />
        </CreateOrganization.Form.CompanyInformation>
        
        <CreateOrganization.Form.Compliance>
          <CreateOrganization.Form.Compliance.CheckUserAgreement />
          <CreateOrganization.Form.Compliance.CheckPrivacyAgreement />
        </CreateOrganization.Form.Compliance>
        
        <CreateOrganization.Form.SubmitButton>
          Create Organization
        </CreateOrganization.Form.SubmitButton>
      </CreateOrganization.Form>
    </CreateOrganization>
  );
}
Result
Loading...

๐Ÿ”ง Props Referenceโ€‹

Main Component Propsโ€‹

PropTypeDefaultDescription
onCreateOrganization(data: T) => voidRequiredCallback function triggered when form is submitted with organization data
classNamestringundefinedAdditional CSS class name for styling the form container
childrenBlocksOverrideundefinedFunction to override default blocks or custom component rendering
directionenum"column"Flex direction for action buttons
alignItemsenum"stretch"Alignment of items in the container
gapSizeenum"S"Gap between items in the container
childrenBlocksOverrideundefinedCustom block components to override default rendering

Sub-Componentsโ€‹

The CreateOrganization component provides several sub-components. All sub-components receive their default values from the main component's context and can override these values through props.

CreateOrganization.Titleโ€‹

PropTypeDefaultDescription
childrenReactNodeRequiredContent to display as the main title
sizeenum"2XL"Typography size for the title
typeenum"heading"Typography type
colorenum"low-emphasis"Color theme for the title
weightenum"bold"Typography weight
classNamestringundefinedAdditional CSS class name for styling

CreateOrganization.Descriptionโ€‹

PropTypeDefaultDescription
childrenReactNodeRequiredContent to display as the description text
classNamestringundefinedAdditional CSS class name for styling
sizeenum"L"Typography size for the title
typeenum"heading"Typography type
colorenum"low-emphasis"Color theme for the title
weightenum"regular"Typography weight
classNamestringundefinedAdditional CSS class name for styling

CreateOrganization.Formโ€‹

PropTypeDefaultDescription
childrenBlocksOverrideundefinedForm content with account holder, company information, and compliance sections
classNamestringundefinedAdditional CSS class name for styling

Note: This component inherits all HTML form element props.

CreateOrganization.Form.AccountHolderโ€‹

PropTypeDefaultDescription
childrenBlocksOverrideundefinedCustom content to override default account holder fields
classNamestringundefinedAdditional CSS class name for styling
directionenum"column"Flex direction for action buttons
alignItemsenum"stretch"Alignment of items in the container
gapSizeenum"S"Gap between items in the container

CreateOrganization.Form.AccountHolder.SectionTitleโ€‹

PropTypeDefaultDescription
childrenReactNode"Account Holder Contact Information"Section title text
sizeenum"L"Typography size for the title
typeenum"heading"Typography type
colorenum"low-emphasis"Color theme for the title
weightenum"bold"Typography weight
classNamestringundefinedAdditional CSS class name for styling

CreateOrganization.Form.AccountHolder.Nameโ€‹

PropTypeDefaultDescription
namestring"applicationUserEmail"Field name for form data
classNamestringundefinedAdditional CSS class name for styling
errorTextstringundefinedError text for the input
isDisabledbooleanundefinedWhether the input is disabled
isRequiredbooleanundefinedWhether the input is required
labelstring"Account Holder Name"Label of the input field
labelWeightenum"bold"Label weight
onOperationClick() => voidundefinedOperation onClick callback
postfixTextstringundefinedText to place after the component
showPasswordbooleanundefinedWhether to show password

Note: This component additional inherits some common HTML input element props.

CreateOrganization.Form.AccountHolder.Emailโ€‹

PropTypeDefaultDescription
namestring"applicationUserEmail"Field name for form data
classNamestringundefinedAdditional CSS class name for styling
errorTextstringundefinedError text for the input
isDisabledbooleanundefinedWhether the input is disabled
isRequiredbooleanundefinedWhether the input is required
labelstring"Account Holder Email"Label of the input field
labelWeightenum"bold"Label weight
onOperationClick() => voidundefinedOperation onClick callback
postfixTextstringundefinedText to place after the component
showPasswordbooleanundefinedWhether to show password

Note: This component additional inherits some common HTML input element props.

CreateOrganization.Form.AccountHolder.Contactโ€‹

PropTypeDefaultDescription
namestring"applicationUserPhoneNumber"Field name for form data
classNamestringundefinedAdditional CSS class name for styling
errorTextstringundefinedError text for the input
isDisabledbooleanundefinedWhether the input is disabled
isRequiredbooleanundefinedWhether the input is required
labelstring"Account Holder Phone Number"Label of the input field
labelWeightenum"bold"Label weight
onOperationClick() => voidundefinedOperation onClick callback
postfixTextstringundefinedText to place after the component
showPasswordbooleanundefinedWhether to show password

Note: This component additional inherits some common HTML input element props.

CreateOrganization.Form.CompanyInformationโ€‹

PropTypeDefaultDescription
childrenReactNodeundefinedCustom content to override default company information fields

CreateOrganization.Form.CompanyInformation.SectionTitleโ€‹

PropTypeDefaultDescription
childrenReactNode"Account Holder Contact Information"Section title text
sizeenum"L"Typography size for the title
typeenum"heading"Typography type
colorenum"low-emphasis"Color theme for the title
weightenum"bold"Typography weight
classNamestringundefinedAdditional CSS class name for styling

CreateOrganization.Form.CompanyInformation.CompanyNameโ€‹

PropTypeDefaultDescription
namestring"companyName"Field name for form data
classNamestringundefinedAdditional CSS class name for styling
errorTextstringundefinedError text for the input
isDisabledbooleanundefinedWhether the input is disabled
isRequiredbooleanundefinedWhether the input is required
labelstring"Company Name"Label of the input field
labelWeightenum"bold"Label weight
onOperationClick() => voidundefinedOperation onClick callback
postfixTextstringundefinedText to place after the component
showPasswordbooleanundefinedWhether to show password

Note: This component additional inherits some common HTML input element props.

CreateOrganization.Form.CompanyInformation.PostCodeโ€‹

PropTypeDefaultDescription
namestring"postcode"Field name for form data
classNamestringundefinedAdditional CSS class name for styling
errorTextstringundefinedError text for the input
isDisabledbooleanundefinedWhether the input is disabled
isRequiredbooleanundefinedWhether the input is required
labelstring"Post Code"Label of the input field
labelWeightenum"bold"Label weight
onOperationClick() => voidundefinedOperation onClick callback
postfixTextstringundefinedText to place after the component
showPasswordbooleanundefinedWhether to show password

Note: This component additional inherits some common HTML input element props.

CreateOrganization.Form.CompanyInformation.Prefectureโ€‹

PropTypeDefaultDescription
namestring"prefecture"Field name for form data
labelstring"Prefecture"Field label
labelWeightenum"bold"Label weight
selectOptionValuesArray<{value: string, label: string}>[]Array of prefecture options
isRequiredbooleanundefinedWhether the field is required
isDisabledbooleanundefinedWhether the input is disabled
errorTextstringundefinedError text for the input
classNamestringundefinedAdditional CSS class name for styling

Note: This component additional inherits some common HTML select element props.

CreateOrganization.Form.CompanyInformation.Cityโ€‹

PropTypeDefaultDescription
namestring"cityTownVillage"Field name for form data
classNamestringundefinedAdditional CSS class name for styling
errorTextstringundefinedError text for the input
isDisabledbooleanundefinedWhether the input is disabled
isRequiredbooleanundefinedWhether the input is required
labelstring"City"Label of the input field
labelWeightenum"bold"Label weight
onOperationClick() => voidundefinedOperation onClick callback
postfixTextstringundefinedText to place after the component
showPasswordbooleanundefinedWhether to show password

Note: This component additional inherits some common HTML input element props.

CreateOrganization.Form.CompanyInformation.TownAddressโ€‹

PropTypeDefaultDescription
namestring"townStreetBuilding"Field name for form data
classNamestringundefinedAdditional CSS class name for styling
errorTextstringundefinedError text for the input
isDisabledbooleanundefinedWhether the input is disabled
isRequiredbooleanundefinedWhether the input is required
labelstring"Town"Label of the input field
labelWeightenum"bold"Label weight
onOperationClick() => voidundefinedOperation onClick callback
postfixTextstringundefinedText to place after the component
showPasswordbooleanundefinedWhether to show password

Note: This component additional inherits some common HTML input element props.

CreateOrganization.Form.CompanyInformation.RepresentativePersonNameโ€‹

PropTypeDefaultDescription
namestring"representivePersonName"Field name for form data
classNamestringundefinedAdditional CSS class name for styling
errorTextstringundefinedError text for the input
isDisabledbooleanundefinedWhether the input is disabled
isRequiredbooleanundefinedWhether the input is required
labelstring"Representative Person Name"Label of the input field
labelWeightenum"bold"Label weight
onOperationClick() => voidundefinedOperation onClick callback
postfixTextstringundefinedText to place after the component
showPasswordbooleanundefinedWhether to show password

Note: This component additional inherits some common HTML input element props.

CreateOrganization.Form.CompanyInformation.RepresentativeContactโ€‹

PropTypeDefaultDescription
namestring"representativePhoneNumber"Field name for form data
classNamestringundefinedAdditional CSS class name for styling
errorTextstringundefinedError text for the input
isDisabledbooleanundefinedWhether the input is disabled
isRequiredbooleanundefinedWhether the input is required
labelstring"Representative Phone Number"Label of the input field
labelWeightenum"bold"Label weight
onOperationClick() => voidundefinedOperation onClick callback
postfixTextstringundefinedText to place after the component
showPasswordbooleanundefinedWhether to show password

Note: This component additional inherits some common HTML input element props.

CreateOrganization.Form.CompanyInformation.CompanyCapitalโ€‹

PropTypeDefaultDescription
namestring"capitalRange"Field name for form data
labelstring"Capital Range"Field label
labelWeightenum"bold"Label weight
selectOptionValuesArray<{value: string, label: string}>[]Array of capital range options
isRequiredbooleantrueWhether the field is required
isDisabledbooleanundefinedWhether the input is disabled
errorTextstringundefinedError text for the input
classNamestringundefinedAdditional CSS class name for styling

Note: This component additional inherits some common HTML select element props.

CreateOrganization.Form.CompanyInformation.CompanySizeโ€‹

PropTypeDefaultDescription
namestring"numberOfEmployees"Field name for form data
labelstring"Company Size"Field label
labelWeightenum"bold"Label weight
selectOptionValuesArray<{value: string, label: string}>[]Array of capital range options
isRequiredbooleantrueWhether the field is required
isDisabledbooleanundefinedWhether the input is disabled
errorTextstringundefinedError text for the input
classNamestringundefinedAdditional CSS class name for styling

Note: This component additional inherits some common HTML select element props.

CreateOrganization.Form.CompanyInformation.HomePageUrlโ€‹

PropTypeDefaultDescription
namestring"companyUrl"Field name for form data
errorTextstringundefinedError text for the input
isDisabledbooleanundefinedWhether the input is disabled
isRequiredbooleanundefinedWhether the input is required
labelstring"Home Page URL"Label of the input field
labelWeightenum"bold"Label weight
onOperationClick() => voidundefinedOperation onClick callback
postfixTextstringundefinedText to place after the component
showPasswordbooleanundefinedWhether to show password

Note: This component additional inherits some common HTML input element props.

CreateOrganization.Form.CompanyInformation.AdditionalInformationโ€‹

PropTypeDefaultDescription
namestring"additionalInformation"Field name for form data
errorTextstringundefinedError text for the input
isDisabledbooleanundefinedWhether the input is disabled
isRequiredbooleanundefinedWhether the input is required
labelstring"Additional Information"Label of the input field
labelWeight`enum
classNamestringundefinedAdditional CSS class name for styling

Note: This component additional inherits some common HTML textarea element props.

CreateOrganization.Form.Complianceโ€‹

PropTypeDefaultDescription
childrenReactNodeundefinedCustom content to override default compliance fields

Note: This component inherits all HTML div element props.

CreateOrganization.Form.Compliance.CheckUserAgreementโ€‹

PropTypeDefaultDescription
namestring"userAgreement"Field name for form data
labelstring"User Agreement"Checkbox label
messagestring"Please check this box if you agree to the terms of service for this applications"Checkbox description message
showMessagebooleantrueWhether to show the message
classNamestringundefinedAdditional CSS class name for styling

Note: This component inherits all HTML checkbox element props.

CreateOrganization.Form.Compliance.CheckPrivacyAgreementโ€‹

PropTypeDefaultDescription
namestring"privacyPolicy"Field name for form data
labelstring"Privacy Agreement"Checkbox label
messagestring"Please check this box if you agree to and understand the terms described in the privacy policy"Checkbox description message
showMessagebooleantrueWhether to show the message
classNamestringundefinedAdditional CSS class name for styling

Note: This component inherits all HTML checkbox element props.

CreateOrganization.Form.SubmitButtonโ€‹

PropTypeDefaultDescription
childrenReactNode"Submit"Text to place inside the button
classNamestringundefinedAdditional CSS class name for styling
fillenum"fill"Button fill style
iconenumundefinedOptional icon for the left-hand side of the button
iconColorenumundefinedColor for the left-hand side icon. When not provided, a default color for the fill type will be used.
isDisabledbooleanfalseWhether the button is disabled and cannot be used
onClickfunctionundefinedFunction to handle button click
sizeenum"M"Button vertical size
textAlignenum"center"Button icon and text positioning within the button
textColorenum"default"Button text color
textEmphasisbooleanfalseButton text weight
textSizeenum"M"Button text size
typeenum"submit"Button purpose (affects html type)

Note: This component additional inherits some common HTML button element props.


๐Ÿ”ง TypeScript Supportโ€‹

Full TypeScript support with comprehensive type definitions:

import {CreateOrganization} from '@nodeblocks/frontend-create-organization-block';
import {ComponentProps} from 'react';

// Main component interface
interface CreateOrganizationProps extends Omit<ComponentProps<'div'>, 'children'> {
onCreateOrganization: (data: DefaultCreateOrganizationFormData) => void;
className?: string;
}

// Default form data interface
export type DefaultCreateOrganizationFormData = {
applicationUserName?: string;
applicationUserEmail?: string;
applicationUserPhoneNumber?: string;
companyName?: string;
postcode?: string;
cityTownVillage?: string;
townStreetBuilding?: string;
representivePersonName?: string;
representativePhoneNumber?: string;
companyUrl?: string;
additionalInformation?: string;
prefecture?: string;
capitalRange?: string;
numberOfEmployees?: string;
userAgreement?: string;
privacyPolicy?: string;
};

// Usage example with full typing
interface CustomOrganizationData extends DefaultCreateOrganizationFormData {
customField?: string;
}

const OrganizationRegistrationForm = () => {
const handleCreateOrganization = (formData: CustomOrganizationData) => {
console.log('Organization data:', formData);
// Type-safe organization data handling
};

return (
<CreateOrganization onCreateOrganization={handleCreateOrganization}>
<CreateOrganization.Title>Register Your Organization</CreateOrganization.Title>
<CreateOrganization.Description>
Complete the form below to create your organization profile
</CreateOrganization.Description>
<CreateOrganization.Form>
<CreateOrganization.Form.AccountHolder />
<CreateOrganization.Form.CompanyInformation />
<CreateOrganization.Form.Compliance.CheckPrivacyAgreement />
<CreateOrganization.Form.SubmitButton>Create Organization</CreateOrganization.Form.SubmitButton>
</CreateOrganization.Form>
</CreateOrganization>
);
};

Built with โค๏ธ using React, TypeScript, and modern web standards.