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() -> Unit✅Called when the button is tapped.
modifierModifier❌Compose 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
labelString✅The button label text.
isLoadingBoolean❌When true, the button is disabled. Defaults to false.
modifierModifier❌Compose modifier.
onClick() -> Unit✅Called when the button is tapped.

Explore with AI

ThunderID LogoThunderID Logo

Product

DocsAPIsSDKs
© Copyright Linux Foundation Europe.For web site terms of use, trademark policy and other project policies please see https://linuxfoundation.eu/en/policies.