ClerkTextField

fun ClerkTextField(value: String, onValueChange: (String) -> Unit, modifier: Modifier = Modifier, onFocusChange: (Boolean) -> Unit = {}, @DrawableRes leadingIcon: Int? = null, @DrawableRes trailingIcon: Int? = null, label: String? = null, placeholder: String? = null, supportingText: String? = null, isError: Boolean = false, enabled: Boolean = true, maxLines: Int = 1, inputContentType: ContentType = ContentType.Username, visualTransformation: VisualTransformation = VisualTransformation.None, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, clerkTheme: ClerkTheme? = null)

A customizable text input field component following Clerk's design system.

This composable provides a styled OutlinedTextField with support for leading/trailing icons, labels, placeholders, supporting text, and error states. The component automatically handles focus states, theming, and accessibility features.

Parameters

value

The current text value of the input field

modifier

Modifier to be applied to the text field

leadingIcon

Optional drawable resource ID for an icon displayed at the start of the field

trailingIcon

Optional drawable resource ID for an icon displayed at the end of the field. When isError is true, this will be overridden with a warning icon

label

Optional text label displayed above the input field

placeholder

Optional placeholder text shown when the field is empty

supportingText

Optional supporting/helper text displayed below the input field

isError

Whether the field should be displayed in an error state with error styling

enabled

Whether the text field is enabled and accepts user input

maxLines

The maximum number of lines to display

inputContentType

The content type for autofill hints, defaults to ContentType.Username