Package-level declarations

One-time codes: JengaOtpField, JengaOtpResend, JengaOtpVerification and rememberJengaCountdown.

Types

Link copied to clipboard

A countdown for JengaOtpResend, measured from a start mark rather than by counting ticks, so it stays correct when the app is paused or frames are dropped.

Link copied to clipboard

What a single cell of a JengaOtpField shows, passed to a custom cell slot.

Link copied to clipboard

How a JengaOtpField draws each cell when no custom cell is given.

Link copied to clipboard
class JengaOtpFieldColors(val container: Color, val filledContainer: Color, val disabledContainer: Color, val border: Color, val activeBorder: Color, val disabledBorder: Color, val errorBorder: Color, val successBorder: Color, val text: Color, val disabledText: Color, val cursor: Color, val supportingText: Color, val errorSupportingText: Color, val successSupportingText: Color)

Resolved colors for a JengaOtpField. Override via JengaOtpFieldDefaults.colors.

Link copied to clipboard

Defaults and token mappings for JengaOtpField.

Link copied to clipboard

Which characters a JengaOtpField accepts. Anything else is dropped as it is typed or pasted.

Link copied to clipboard
class JengaOtpResendColors(val countdown: Color, val action: Color, val disabledAction: Color, val progress: Color)

Resolved colors for a JengaOtpResend. Override via JengaOtpResendDefaults.colors.

Link copied to clipboard

Defaults and token mappings for JengaOtpResend.

Functions

Link copied to clipboard
fun JengaOtpField(value: String, onValueChange: (String) -> Unit, contentDescription: String, modifier: Modifier = Modifier, length: Int = JengaOtpFieldDefaults.Length, onComplete: (String) -> Unit? = null, inputType: JengaOtpInputType = JengaOtpInputType.Numeric, status: JengaTextFieldStatus = JengaTextFieldStatus.Default, supportingText: String? = null, enabled: Boolean = true, readOnly: Boolean = false, masked: Boolean = false, autoFocus: Boolean = false, style: JengaOtpCellStyle = JengaOtpCellStyle.Outlined, cellSize: DpSize = JengaOtpFieldDefaults.cellSize, cellSpacing: Dp = JengaOtpFieldDefaults.cellSpacing, groupSize: Int = 0, shape: Shape = JengaOtpFieldDefaults.shape, colors: JengaOtpFieldColors = JengaOtpFieldDefaults.colors(), textStyle: TextStyle = JengaOtpFieldDefaults.textStyle, cell: @Composable (JengaOtpCellState) -> Unit? = null)

A one-time-code input drawn as a row of cells.

Link copied to clipboard
fun JengaOtpResend(remaining: Duration, onResend: () -> Unit, countdownText: String, resendText: String, modifier: Modifier = Modifier, sending: Boolean = false, enabled: Boolean = true, textStyle: TextStyle = JengaOtpResendDefaults.textStyle, colors: JengaOtpResendColors = JengaOtpResendDefaults.colors(), contentPadding: PaddingValues = JengaOtpResendDefaults.contentPadding)

The "resend code" row under a JengaOtpField: a countdown while remaining is positive, then a resend action.

Link copied to clipboard
fun JengaOtpVerification(title: String, description: AnnotatedString, field: @Composable () -> Unit, modifier: Modifier = Modifier, verifying: Boolean = false, verifyingText: String? = null, header: @Composable () -> Unit? = null, resend: @Composable () -> Unit? = null, actions: @Composable ColumnScope.() -> Unit? = null, contentPadding: PaddingValues = JengaOtpVerificationDefaults.contentPadding, spacing: Dp = JengaOtpVerificationDefaults.spacing, titleStyle: TextStyle = JengaOtpVerificationDefaults.titleStyle, descriptionStyle: TextStyle = JengaOtpVerificationDefaults.descriptionStyle)

A complete code-verification block: optional header, title, description, the code field, a "verifying" row, the resend row and actions, centered and spaced consistently.

Link copied to clipboard
fun rememberJengaCountdown(duration: Duration, key: Any? = null, timeSource: TimeSource = TimeSource.Monotonic): JengaCountdownState

Remembers a JengaCountdownState that starts at duration and ticks down while composed.