Skip to main content

<OrganizationSwitcher />

The OrganizationSwitcher component renders a dropdown that allows users to switch between their organizations in multi-tenant B2B applications.

Usage

Basic Usage

src/Header.jsx
import { OrganizationSwitcher } from '@asgardeo/react'

function Header() {
return (
<header>
<OrganizationSwitcher />
</header>
)
}

export default Header

With Create Option

Allow users to create new organizations from the switcher:

src/Header.jsx
import { OrganizationSwitcher } from '@asgardeo/react'

function Header() {
return (
<OrganizationSwitcher
showCreateOrganization={true}
createOrganizationUrl="/create-org"
/>
)
}

export default Header

Props

PropTypeRequiredDescription
showCreateOrganizationbooleanShow create organization option (defaults to false)
createOrganizationUrlstringURL for creating organizations
appearanceAppearanceCustomize component appearance
Thunder LogoThunder Logo

Work together seamlessly with secure your applications with ease.

Terms & Policy

Pages

HomeDocsAPIsSDKs
© WSO2 LLC. All rights reserved.