Rxova
Skip to content

OtpSlotState

Per-slot state handed to <OtpSlot> (via context), to the render prop, and returned by the hook as slots. The analogue of RatingIconState in the sibling repo — a plain, serializable description of one slot, no handlers.

char: string | null;

The character in this slot, or null when empty. Already masked when mask is set.


hasFakeCaret: boolean;

Render the blinking caret here.


index: number;

0-based position in the row.


isActive: boolean;

The caret is at this slot, or a selection covers it.


isDisabled: boolean;

isFilled: boolean;

char !== null


isReadOnly: boolean;

placeholder: string | null;

Placeholder char for this slot, or null.