CDP Frontend SDK
    Preparing search index...

    Function SignOutButton

    • A button that signs the user out.

      Parameters

      • Optionalprops: SignOutButtonProps

        The props for the component.

        Props for the SignOutButton component.

        • Optionalchildren?: ReactNode

          The children to render inside the button.

        • OptionalonSuccess?: () => void

          A function to call when the sign-out is successful.

        • OptionalpendingLabel?: ReactNode

          A label to render when the button state is pending.

        • Optionalvariant?: ButtonVariant

          The variant of the button. Defaults to "primary".

        • OptionalasChild?: boolean

          Set to true to use a custom element or component in place of the default button element.

        • OptionalfullWidth?: boolean

          Whether the button should be full width.

        • OptionalisPending?: boolean

          Whether the button state is pending.

        • Optionalsize?: ButtonSize

          The size of the button. Defaults to "md".

      Returns Element

      The rendered component.

      // Render a sign out button
      <SignOutButton onSuccess={() => console.log("Sign out success")} />
      // Render a sign out button with a custom label, size, and variant
      <SignOutButton size="sm" variant="secondary">Log out</SignOutButton>
      // Render a sign out button with a custom button element
      <SignOutButton asChild>
      <button className="custom-button">Log out</button>
      </SignOutButton>