Input OTP

Rust/UI component that displays an OTP input.

  • Rust/UI Icons - CopyCopy Demo
use leptos::prelude::*;

use crate::components::ui::input_otp::{InputOTP, InputOTPSlot};

#[component]
pub fn DemoInputOtp() -> impl IntoView {
    view! {
        <InputOTP attr:id="otp-container">
            <InputOTPSlot attr:maxlength="1" />
            <InputOTPSlot attr:maxlength="1" />
            <InputOTPSlot attr:maxlength="1" />
            <InputOTPSlot attr:maxlength="1" />
            <InputOTPSlot attr:maxlength="1" />
            <InputOTPSlot attr:maxlength="1" />
        </InputOTP>
    }
}

Installation

# Coming soon :)

Usage

// Coming soon 🦀