Wocha Docs

OrganizationProfile

Organisation management with members, settings, security, and custom pages.

The <OrganizationProfile> component provides a tabbed organisation management interface: overview, members, settings, and enterprise SSO status. It uses the Customer API with the signed-in user's access token.

Installation

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

Basic usage

<OrganizationProfile orgId="org_abc123" />

When orgId is omitted, the active organisation from auth context is used.

Props

PropTypeDefaultDescription
orgIdstringActive org from contextOrganisation ID to manage
appearanceWochaAppearanceVisual customisation
classNamestringAdditional class name
sectionsOrgProfileSection[]All built-in sectionsSections to display
activeSectionOrgProfileNavId"overview"Currently active section
onSectionChange(section) => voidCalled when the user changes section
fallbackReactNodeShown while organisation data is loading
childrenReactNodeComposition children (OrganizationProfile.Page, OrganizationProfile.Link)

OrgProfileSection is "overview" | "members" | "settings" | "security".

Composition API

Add custom organisation pages:

<OrganizationProfile>
  <OrganizationProfile.Page label="Integrations" url="integrations" icon={<PlugIcon />}>
    <IntegrationsPage />
  </OrganizationProfile.Page>
  <OrganizationProfile.Link label="Console" url="https://console.wocha.ai" />
</OrganizationProfile>

Open via <OrgSwitcher> rather than embedding directly:

// Modal — opens in overlay from OrgSwitcher menu
<OrgSwitcher organisationProfileMode="modal" />
 
// Navigation — routes to dedicated page
<OrgSwitcher
  organisationProfileMode="navigation"
  organisationProfileUrl="/settings/organisation"
/>

Theming

<WochaThemeProvider
  appearance={{
    organisationProfile: {
      variables: { "--wocha-color-primary": "#2563eb" },
    },
  }}
>
  <OrganizationProfile />
</WochaThemeProvider>

Framework notes

Requires apiUrl on your provider. Works in client components for both React and Next.js.

On this page