ClerkButton

fun ClerkButton(text: String?, onClick: () -> Unit, modifier: Modifier = Modifier, isEnabled: Boolean = true, isLoading: Boolean = false, paddingValues: PaddingValues = PaddingValues(), configuration: ClerkButtonConfiguration = ClerkButtonDefaults.configuration(), icons: ClerkButtonIcons = ClerkButtonDefaults.icons(), clerkTheme: ClerkTheme? = null)

A custom button component styled according to Clerk's design system.

This button is built on top of Material3's Button to provide Clerk's specific look and feel, including variants for style, emphasis, and size. It can display a text label, icons, or a combination of both. It also supports loading and disabled states.

Parameters

text

The text label displayed on the button. If null, only icons will be shown.

onClick

A lambda to be invoked when the button is pressed.

modifier

The Modifier to be applied to the button.

isEnabled

When false, the button will be visually disabled and will not respond to clicks.

isLoading

When true, a circular progress indicator is shown instead of the button's content.

paddingValues

The padding to apply to the button's content.

configuration

Configuration object that controls the button's visual appearance, including its style, size, and emphasis. Use ClerkButtonDefaults.configuration to create an instance.

icons

Configuration for optional leading and trailing icons. Use ClerkButtonDefaults.icons to specify the icons and their colors.

Example of a primary button:

ClerkButton(
text = "Continue",