UserButton

fun UserButton(clerkTheme: ClerkTheme? = null, treatPendingAsSignedOut: Boolean = false, routeToAuthWhenForcedMfa: Boolean = true, customRows: List<UserProfileCustomRow> = emptyList(), customDestination: @Composable (String) -> Unit? = null, onRequiresForcedMfaClick: () -> Unit? = null)

Self-contained avatar button + user profile flow.

Drop this into a TopAppBar actions slot; on tap it will open the full user profile UI in a full-screen dialog and close itself when done.

Parameters

clerkTheme

Optional theme customization for the user profile UI.

treatPendingAsSignedOut

When true, the button will only appear when the session status is ACTIVE. When false (default), the button may appear in pending sessions.

routeToAuthWhenForcedMfa

When true (default), clicking the button while the current session has unresolved MFA setup tasks routes to auth instead of opening profile.

customRows

Custom rows to display on the profile account screen.

customDestination

Composable that renders the destination for a given route key. The route key matches UserProfileCustomRow.routeKey of the tapped row. Custom destinations survive activity recreation (e.g. rotation).

onRequiresForcedMfaClick

Optional callback used when the current session has outstanding MFA setup tasks. If not provided, the button will open AuthView in a full-screen dialog.