DefaultOtpCell
fun DefaultOtpCell(state: OtpCellState, modifier: Modifier = Modifier, placeholder: String = "", colors: OtpCellColors = OtpInputDefaults.colors(), dimensions: OtpCellDimensions = OtpInputDefaults.dimensions(), animationSpec: OtpAnimationSpec = OtpInputDefaults.animationSpec(), shape: Shape = OtpInputDefaults.shape(dimensions.cornerRadius), maskConfig: OtpMaskConfig = OtpInputDefaults.maskConfig(), cursorConfig: OtpCursorConfig = OtpInputDefaults.cursorConfig(color = colors.cursorColor), textStyles: OtpTextStyles = OtpInputDefaults.textStyles(dimensions.textSize), contentPadding: OtpCellPadding = OtpInputDefaults.contentPadding())(source)
The rounded box cell OtpInputField uses when you don't pass your own cell.
Call it from a custom cell slot when you only want to change a few values for some cells:
OtpInputField(state = otpState, otpLength = 6) { cell ->
DefaultOtpCell(state = cell, shape = if (cell.index == 0) CircleShape else RoundedCornerShape(8.dp))
}Content copied to clipboard