PyBlade/ui
Menu⌄
DocsComponentsInput OTP

Input OTP

A one-time code input, one box per character, with paste support.

Alpine.js1 file

Installation

pyblade-ui add input-otp

Usage

The tag <pb-ui.input-otp> is available in all your templates.

<pb-ui.input-otp name="code" :length="6" />

Examples

With a label

Props

PropDefault
name'code'
length6

Any other attribute (class, id, x-on:click, hx-post…) is passed to the root element; your Tailwind classes win over the component's.