type InputOTPLayout struct {
Bounds ui.Rect
SlotSize float32
Slots int
GroupSize int
SeparatorSpan float32
}
InputOTPLayout describes the deterministic intrinsic geometry of an OTP row.
Constructors
PaintInputOTP#
func PaintInputOTP(canvas *ui.Canvas, theme ui.Theme, origin ui.Rect, snapshot InputOTPSnapshot) InputOTPLayout
PaintInputOTP paints the official grouped 32px native adaptation of the
shadcn 36px slots and returns intrinsic layout information.
Methods
SlotBounds#
func (layout InputOTPLayout) SlotBounds(index int) ui.Rect
SlotBounds returns one slot rectangle, or zero for an invalid index.