Skip to main content

SignInButton

The SignInButton composable renders a pre-styled button that calls an onClick lambda when tapped. It does not initiate the sign-in flow itself — your onClick handler opens the sign-in UI (e.g., showing a SignIn form or launching the redirect URL).

SignInButton requires ThunderIDProvider in its ancestor composable hierarchy.

Usage

import dev.thunderid.compose.components.actions.SignInButton

@Composable
fun LandingView() {
var showSignIn by remember { mutableStateOf(false) }

SignInButton(onClick = { showSignIn = true })

if (showSignIn) {
SignIn(applicationId = "<your-application-id>")
}
}

Parameters

ParameterTypeRequiredDescription
onClick() -> UnitCalled when the button is tapped.
modifierModifierCompose modifier.

Customization with BaseSignInButton

BaseSignInButton is the unstyled variant for fully custom sign-in button UI.

import dev.thunderid.compose.components.actions.BaseSignInButton

@Composable
fun CustomSignInButton(onClick: () -> Unit) {
BaseSignInButton(
label = "Log In",
isLoading = false,
modifier = Modifier.fillMaxWidth(),
onClick = onClick
)
}

BaseSignInButton Parameters

ParameterTypeRequiredDescription
labelStringThe button label text.
isLoadingBooleanWhen true, the button is disabled. Defaults to false.
modifierModifierCompose modifier.
onClick() -> UnitCalled when the button is tapped.
ThunderID LogoThunderID Logo

Product

DocsAPIsSDKs
© WSO2 LLC. All rights reserved.Privacy PolicyCookie Policy