OrganizationSwitcher

fun OrganizationSwitcher(modifier: Modifier = Modifier, clerkTheme: ClerkTheme? = null, onOrganizationChanged: () -> Unit? = null, hidePersonal: Boolean = false, displayMode: OrganizationSwitcherDisplayMode = OrganizationSwitcherDisplayMode.Normal, onManageOrganization: (OrganizationMembership) -> Unit? = null, onCreateOrganization: (OrganizationCreationDefaults?) -> Unit? = null, organizationProfileCustomRows: List<OrganizationProfileCustomRow> = emptyList(), organizationProfileCustomDestination: @Composable (String) -> Unit? = null)

Self-contained active organization switcher.

Drop this into a top app bar or page header. When organizations are enabled for the instance, it renders the active organization or personal account and opens account management sheets for switching between personal and organization accounts.

Parameters

clerkTheme

Optional theme customization for the switcher UI.

onOrganizationChanged

Optional callback invoked after a successful organization or personal-account switch.

hidePersonal

Hides personal account selection when the instance does not force organization selection.

displayMode

Controls whether the trigger renders in normal or compact form.

onManageOrganization

Called when the active organization overview's manage action is selected. When null, the switcher opens OrganizationProfileView.

onCreateOrganization

Called when the create-organization row is selected from the switch account sheet. When null, the switcher opens the default organization creation flow.

organizationProfileCustomRows

Custom rows forwarded to the switcher's default OrganizationProfileView.

organizationProfileCustomDestination

Custom destination builder forwarded to the switcher's default OrganizationProfileView.


fun OrganizationSwitcher(modifier: Modifier = Modifier, clerkTheme: ClerkTheme? = null, onOrganizationChanged: () -> Unit? = null, hidePersonal: Boolean = false, displayMode: OrganizationSwitcherDisplayMode = OrganizationSwitcherDisplayMode.Normal, triggerContent: @Composable () -> Unit, onManageOrganization: (OrganizationMembership) -> Unit? = null, onCreateOrganization: (OrganizationCreationDefaults?) -> Unit? = null, organizationProfileCustomRows: List<OrganizationProfileCustomRow> = emptyList(), organizationProfileCustomDestination: @Composable (String) -> Unit? = null)

Self-contained active organization switcher with a custom trigger.

Use triggerContent when an app wants Clerk to own the switcher sheets while rendering its own clickable trigger content.

Parameters

clerkTheme

Optional theme customization for the switcher UI.

onOrganizationChanged

Optional callback invoked after a successful organization or personal-account switch.

hidePersonal

Hides personal account selection when the instance does not force organization selection.

displayMode

Stored for parity with the default switcher configuration. Custom trigger content is rendered as provided.

triggerContent

Custom clickable trigger content.

onManageOrganization

Called when the active organization overview's manage action is selected. When null, the switcher opens OrganizationProfileView.

onCreateOrganization

Called when the create-organization row is selected from the switch account sheet. When null, the switcher opens the default organization creation flow.

organizationProfileCustomRows

Custom rows forwarded to the switcher's default OrganizationProfileView.

organizationProfileCustomDestination

Custom destination builder forwarded to the switcher's default OrganizationProfileView.