āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/clerk/clerk-docs/reference/components/organization/organization-list ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
<OrganizationList /> component'
description: Clerk's <OrganizationList /> component is used to display organization related memberships, invitations, and suggestions for the user.
sdk: astro, chrome-extension, expo, nextjs, nuxt, react, react-router, remix, tanstack-react-start, vue, js-frontend
{{ style: { maxWidth: '460px' } }}
The <OrganizationList /> component displays organization-related memberships and automatic invitations and suggestions for the user.
<If sdk={["astro", "chrome-extension", "expo", "nextjs", "nuxt", "react", "react-router", "remix", "tanstack-react-start", "vue"]}
export default function OrganizationListPage() {
return (
<OrganizationList
afterCreateOrganizationUrl="/organization/:slug"
afterSelectPersonalUrl="/user/:id"
afterSelectOrganizationUrl="/organization/:slug"
/>
)
}
```
</If>
<If sdk="react">
```jsx {{ filename: 'src/App.tsx' }}
import { OrganizationList } from '@clerk/clerk-react'
function App() {
return <OrganizationList />
}
export default App
```
</If>
<If sdk="astro">
```astro {{ filename: '/pages/organizations.astro' }}
---
import { OrganizationList } from '@clerk/astro/components'
---
<OrganizationList
afterCreateOrganizationUrl="/organization/:slug"
afterSelectPersonalUrl="/user/:id"
afterSelectOrganizationUrl="/organization/:slug"
/>
```
</If>
<If sdk="expo">
<Include src="_partials/expo/web-only-callout" />
```jsx {{ filename: '/app/organizations.web.tsx' }}
import { OrganizationList } from '@clerk/clerk-expo/web'
export default function OrganizationListPage() {
return (
<OrganizationList
afterCreateOrganizationUrl={(org) => `/organization/${org.slug}`}
afterSelectPersonalUrl={(user) => `/user/${user.id}`}
afterSelectOrganizationUrl={(org) => `/organization/${org.slug}`}
/>
)
}
```
</If>
<If sdk="chrome-extension">
```jsx {{ filename: 'src/routes/organizations.tsx' }}
import { OrganizationList } from '@clerk/chrome-extension'
export default function OrganizationListPage() {
return <OrganizationList />
}
```
</If>
<If sdk="remix">
```tsx {{ filename: 'app/routes/organizations.tsx' }}
import { OrganizationList } from '@clerk/remix'
export default function OrganizationListPage() {
return (
<OrganizationList
afterCreateOrganizationUrl={(org) => `/organization/${org.slug}`}
afterSelectPersonalUrl={(user) => `/user/${user.id}`}
afterSelectOrganizationUrl={(org) => `/organization/${org.slug}`}
/>
)
}
```
</If>
<If sdk="react-router">
```tsx {{ filename: 'app/routes/organizations.tsx' }}
import { OrganizationList } from '@clerk/react-router'
export default function OrganizationListPage() {
return (
<OrganizationList
afterCreateOrganizationUrl={(org) => `/organization/${org.slug}`}
afterSelectPersonalUrl={(user) => `/user/${user.id}`}
afterSelectOrganizationUrl={(org) => `/organization/${org.slug}`}
/>
)
}
```
</If>
<If sdk="tanstack-react-start">
```tsx {{ filename: 'app/routes/organizations.tsx' }}
import { OrganizationList } from '@clerk/tanstack-react-start'
import { createFileRoute } from '@tanstack/react-router'
export const Route = createFileRoute('/organizations')({
component: OrganizationListPage,
})
function OrganizationListPage() {
return (
<OrganizationList
afterCreateOrganizationUrl={(org) => `/organization/${org.slug}`}
afterSelectPersonalUrl={(user) => `/user/${user.id}`}
afterSelectOrganizationUrl={(org) => `/organization/${org.slug}`}
/>
)
}
```
</If>
<If sdk="vue">
```vue {{ filename: 'organizations.vue' }}
<script setup lang="ts">
import { OrganizationList } from '@clerk/vue'
</script>
<template>
<OrganizationList
:after-create-organization-url="(org) => `/organization/${org.slug}`"
:after-select-personal-url="(org) => `/organization/${org.slug}`"
:after-select-organization-url="(org) => `/organization/${org.slug}`"
/>
</template>
```
</If>
<If sdk="nuxt">
```vue {{ filename: 'pages/organizations.vue' }}
<script setup lang="ts">
// Components are automatically imported
</script>
<template>
<OrganizationList
:after-create-organization-url="(org) => `/organization/${org.slug}`"
:after-select-personal-url="(user) => `/user/${user.id}`"
:after-select-organization-url="(org) => `/organization/${org.slug}`"
/>
</template>
```
</If>
</If>
<If sdk="js-frontend">
## 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.
function mountOrganizationList(node: HTMLDivElement, props?: OrganizationListProps): void
mountOrganizationList() paramsThe `<div>` element used to render in the `<OrganizationList />` component
---
- `props?`
- [`OrganizationListProps`](#properties)
The properties to pass to the `<OrganizationList />` component
</Properties>
mountOrganizationList() usageimport { Clerk } from '@clerk/clerk-js'
// Initialize Clerk with your Clerk Publishable Key
const clerkPubKey = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY
const clerk = new Clerk(clerkPubKey)
await clerk.load()
document.getElementById('app').innerHTML = `
<div id="organization-list"></div>
`
const orgListDiv = document.getElementById('organization-list')
clerk.mountOrganizationList(orgListDiv)
unmountOrganizationList()Unmount and run cleanup on an existing <OrganizationList /> component instance.
function unmountOrganizationList(node: HTMLDivElement): void
unmountOrganizationList() paramsThe container `<div>` element with a rendered `<OrganizationList />` component instance
</Properties>
unmountOrganizationList() usageimport { Clerk } from '@clerk/clerk-js'
// Initialize Clerk with your Clerk Publishable Key
const clerkPubKey = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY
const clerk = new Clerk(clerkPubKey)
await clerk.load()
document.getElementById('app').innerHTML = `
<div id="organization-list"></div>
`
const orgListDiv = document.getElementById('organization-list')
clerk.mountOrganizationList(orgListDiv)
// ...
clerk.unmountOrganizationList(orgListDiv)
</If>
The <OrganizationList /> component accepts the following properties, all of which are optional:
The full URL or path to navigate to after creating a new organization.
afterSelectOrganizationUrlThe full URL or path to navigate to after selecting an organization. Defaults to undefined.
afterSelectPersonalUrlThe full URL or path to navigate to after selecting the personal account. Defaults to undefined.
appearanceOptional object to style your components. Will only affect Clerk components and not Account Portal pages.
fallback?ReactNodeAn optional element to be rendered while the component is mounting.
hidePersonalbooleanA boolean that controls whether <OrganizationList /> will include the user's personal account in the organization list. Setting this to true will hide the personal account option, and users will only be able to switch between organizations. Defaults to false.
hideSlugbooleanA boolean that controls whether the optional slug field in the organization creation screen is hidden. Defaults to false.
skipInvitationScreenboolean | undefinedA boolean that controls whether the screen for sending invitations after an organization is created is hidden. When undefined, Clerk will automatically hide the screen if the number of max allowed members is equal to 1. Defaults to false.
</Properties>
To learn about how to customize Clerk components, see the customization documentation.
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā