UnderlineOtpCell

fun UnderlineOtpCell(state: OtpCellState, modifier: Modifier = Modifier, placeholder: String = "", colors: OtpCellColors = OtpInputDefaults.colors(), dimensions: OtpCellDimensions = OtpInputDefaults.dimensions(), animationSpec: OtpAnimationSpec = OtpInputDefaults.animationSpec(), maskConfig: OtpMaskConfig = OtpInputDefaults.maskConfig(), cursorConfig: OtpCursorConfig = OtpInputDefaults.cursorConfig(color = colors.cursorColor), textStyles: OtpTextStyles = OtpInputDefaults.textStyles(dimensions.textSize), contentPadding: OtpCellPadding = OtpInputDefaults.contentPadding())(source)

A cell drawn as a character above a line that changes color and thickness with the cell's state. The container colors from colors are not used.

OtpInputField(state = otpState, otpLength = 6) { cell ->
UnderlineOtpCell(state = cell)
}