npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ngxsmk-otp-input

v1.0.0

Published

Angular 17+ OTP/PIN input component (standalone + SCSS)

Readme

🚀 ngxsmk-otp-input

Angular 17+ ⚡ standalone OTP/PIN input component — beautifully styled with SCSS, built for ReactiveForms, and optimized for speed & DX.

npm version downloads angular version license


✨ Why ngxsmk-otp-input?

  • 🧩 Plug & Play — drop-in standalone component (no NgModule needed)
  • 📱 Mobile-friendly — supports one-time-code autofill & numeric keypad
  • 🎯 Customizable — length, numeric-only, mask character, autocomplete
  • ⌨️ Smart UX — paste detection, arrow navigation, backspace handling
  • ♿ Accessible — ARIA labels & roles built-in
  • 🎨 Theme-ready — tweak with CSS variables
  • ✅ Forms-ready — works seamlessly with Reactive & Template-driven forms

📦 Install

  npm install ngxsmk-otp-input

👉 Requires Angular v17+


🚀 Quick Start

import { Component } from '@angular/core';
import { ReactiveFormsModule, FormGroup, FormControl, Validators } from '@angular/forms';
import { OtpInputComponent } from 'ngxsmk-otp-input';

@Component({
  selector: 'app-demo',
  standalone: true,
  imports: [ReactiveFormsModule, OtpInputComponent],
  template: `
    <form [formGroup]="form" (ngSubmit)="submit()">
      <h2>🔑 Enter OTP</h2>
      <ngxsmk-otp-input
        formControlName="code"
        [length]="6"
        [numeric]="true"
        [mask]="false"
        (changed)="onChanged($event)"
        (completed)="onCompleted($event)">
      </ngxsmk-otp-input>
      <button type="submit">Verify</button>
    </form>
  `
})
export class DemoComponent {
  form = new FormGroup({
    code: new FormControl('', [Validators.required, Validators.minLength(6)])
  });

  onChanged(v: string) { console.log('Changed:', v); }
  onCompleted(v: string) { console.log('Completed:', v); }
  submit() { console.log('Form:', this.form.value); }
}

⚙️ Inputs

| Input | Type | Default | Description | | -------------- | ----------------------------------- | ----------------- | ------------------------------ | | length | number | 6 | Number of OTP boxes | | numeric | boolean | true | Only allow 0-9 digits | | mask | boolean | false | Mask entered characters | | maskChar | string | • | Character to show when masking | | autocomplete | 'one-time-code' \| 'otp' \| 'off' | 'one-time-code' | Input autocomplete hint | | isInvalid | boolean | false | Marks invalid styling | | idPrefix | string | 'ngxsmk-otp' | Input element id prefix |


📤 Outputs

| Output | Type | Fires When | | ----------- | -------- | --------------------------------- | | changed | string | OTP value changes | | completed | string | All boxes filled with valid input |


🎨 Theming

ngxsmk-otp-input {
  --ngx-otp-border: #e5e7eb;
  --ngx-otp-focus: #8b5cf6;
  --ngx-otp-bg: #f9fafb;
  --ngx-otp-fg: #1f2937;
  --ngx-otp-invalid: #ef4444;
}

🛠 Development

  ng build ngxsmk-otp-input

Output: dist/ngxsmk-otp-input/


📦 Publish to npm

  cd dist/ngxsmk-otp-input
  npm publish --access public

📄 License

MIT


🌟 Community

If you like this project, give it a ⭐ on GitHub and share with others!


🙌 Credits

Made with ❤️ by developers for developers — because OTP inputs shouldn’t be painful.