Saltar al contenido principal
NeuralUIv1.14.3Nuevo
GitHub
Componente

Input OTP

Entrada de código de un solo uso con autoadvance, soporte de pegado y foco accesible por teclado

TypeScript
import { NeuInputOTPComponent } from '@neural-ui/core/input-otp';

Parcial: –

TypeScript
import { NeuInputOTPComponent } from '@neural-ui/core/input-otp';

@Component({
  imports: [NeuInputOTPComponent],
  template: `
    <neu-input-otp
      [length]="6"
      (completed)="onOtpComplete($event)"
    />
  `
})
export class VerifyComponent {
  onOtpComplete(code: string) {
    console.log('OTP completo:', code); // e.g. "123456"
    this.verify(code);
  }
}