NewWacht Bench is live — AI-assisted development for Wacht

<CreateOrganizationForm/> component

<CreateOrganizationForm /> is the standalone organization creation form. It collects the organization name, optional description, and optional image before it creates the new organization and refreshes the current session state.

Usage

The following example shows a basic usage of <CreateOrganizationForm />.

export default function CreateOrganizationPage() {  return <CreateOrganizationForm />;}

Properties

All properties are optional unless otherwise noted.

onSuccess?: (result?: ApiResult<{ organization: Organization; membership: OrganizationMembership }>) => void | undefined;
Called after the organization is created and the session has been refreshed.
onCancel?: () => void | undefined;
Called when the user backs out of the form.

Behavior

The form keeps local state for the name, description, image upload, preview image, and submission state.
It sanitizes the values before submit, rejects invalid names early, and refreshes the session after the organization is created.
  • The image is optional.
  • The component uses the shared toast and default styles context for feedback and presentation.

Examples

Create organization page

export default function CreateOrganizationPage() {  return <CreateOrganizationForm />;}

On this page