Vgs Cardholder Text Field
fun VgsCardholderTextField(state: VgsCardholderTextFieldState, onStateChange: (state: VgsCardholderTextFieldState) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, readOnly: Boolean = false, textStyle: TextStyle = LocalTextStyle.current, label: @Composable () -> Unit? = null, placeholder: @Composable () -> Unit? = null, leadingIcon: @Composable () -> Unit? = null, trailingIcon: @Composable () -> Unit? = null, prefix: @Composable () -> Unit? = null, suffix: @Composable () -> Unit? = null, supportingText: @Composable () -> Unit? = null, isError: Boolean = false, visualTransformation: VgsVisualTransformation = VgsVisualTransformation.None, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, keyboardActions: KeyboardActions = KeyboardActions.Default, interactionSource: MutableInteractionSource? = null, shape: Shape = TextFieldDefaults.shape, colors: TextFieldColors = TextFieldDefaults.colors())
Material 3 filled text field for collecting a cardholder name.
Obtain state with com.verygoodsecurity.vgscollect.widget.compose.state.rememberVgsCardholderTextFieldState and pass the latest instance back through onStateChange. All other parameters match androidx.compose.material3.TextField.
The raw value stays inside the SDK — submit by passing the state to com.verygoodsecurity.vgscollect.core.VGSCollect.asyncSubmit.
Parameters
state
current immutable field state.
on State Change
invoked with the next state on every user edit.