Skip to content
Compare
Choose a tag to compare
@clerk-cookie clerk-cookie released this 17 Oct 15:10
· 348 commits to main since this release
1647b9e

Minor Changes

  • Introducing experimental asProvider, asStandalone, and <X.Outlet /> for <UserButton /> and <OrganizationSwitcher /> components. (#4042) by @panteliselef

    • asProvider converts <UserButton /> and <OrganizationSwitcher /> to a provider that defers rendering until <Outlet /> is mounted.
    • <Outlet /> also accepts a asStandalone prop. It will skip the trigger of these components and display only the UI which was previously inside the popover. This allows developers to create their own triggers.

    Example usage:

    <UserButton __experimental_asProvider afterSignOutUrl="/">
      <UserButton.UserProfilePage label="Custom Page" url="/custom-page">
        <h1> This is my page available to all children </h1>
      </UserButton.UserProfilePage>
      <UserButton.__experimental_Outlet __experimental_asStandalone />
    </UserButton>
    <OrganizationSwitcher __experimental_asProvider afterSignOutUrl="/">
      <OrganizationSwitcher.OrganizationProfilePage
        label="Custom Page"
        url="/custom-page"
      >
        <h1> This is my page available to all children </h1>
      </OrganizationSwitcher.OrganizationProfilePage>
      <OrganizationSwitcher.__experimental_Outlet __experimental_asStandalone />
    </OrganizationSwitcher>

Patch Changes