<OrganizationList />
component
The <OrganizationList />
component is used to display organization related memberships, invitations, and suggestions for the user.
Properties
All props are optional.
- Name
hidePersonal
- Type
boolean
- Description
By default, users can switch between organization and their personal account. This option controls whether
<OrganizationList />
will include the user's personal account in the organization list. Setting this tofalse
will hide the personal account entry, and users will only be able to switch between organizations.
Defaults tofalse
.
- Name
skipInvitationScreen
- Type
boolean | undefined
- Description
Hides the screen for sending invitations after an organization is created. When left undefined Clerk will automatically hide the screen if the number of max allowed members is equal to 1.
Defaults tofalse
.
- Name
appearance
- Type
Appearance | undefined
- Description
Optional object to style your components. Will only affect Clerk components and not Account Portal pages.
- Name
afterCreateOrganizationUrl
- Type
((org: Organization) => string) | string
- Description
Full URL or path to navigate to after creating a new organization.
- Name
afterSelectOrganizationUrl
- Type
((org: Organization) => string) | string
- Description
Full URL or path to navigate to after selecting an organization.
Defaults toundefined
.
- Name
afterSelectPersonalUrl
- Type
((org: Organization) => string) | string
- Description
Full URL or path to navigate to after selecting the personal account.
Defaults toundefined
.
- Name
hideSlug
- Type
boolean
- Description
Hides the optional slug field in the organization creation screen.
Usage with JavaScript
The following methods available on an instance of the Clerk
class are used to render and control the <OrganizationList />
component:
The following examples assume that you have followed the quickstart in order to add Clerk to your JavaScript application.
mountOrganizationList()
Render the <OrganizationList />
component to an HTML <div>
element.
- Name
node
- Type
HTMLDivElement
- Description
The
<div>
element used to render in the<OrganizationList />
component
- Name
props?
- Type
OrganizationListProps
- Description
The properties to pass to the
<OrganizationList />
component
unmountOrganizationList()
Unmount and run cleanup on an existing <OrganizationList />
component instance.
- Name
node
- Type
HTMLDivElement
- Description
The container
<div>
element with a rendered<OrganizationList />
component instance
Force organizations
If you would like to prohibit people from using their personal accounts and force them to be part of an organization, the hidePersonal
property forces your user to join or create an organization in order to continue. For more information on how to hide Personal Accounts and force organizations, see the dedicated guide.
Customization
To learn about how to customize Clerk components, see the customization documentation.
Feedback
Last updated on