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

@ghcordeiro/ngx-mask

v20.0.5

Published

awesome ngx mask

Readme

Table of Contents

Features

NGX-MASK is a feature-rich input mask directive for Angular applications that provides:

🎯 Masking Patterns

• Custom patterns & expressions

• Multiple mask patterns (|)

• Built-in common patterns

• Prefix & suffix support

🔢 Number Formatting

• Thousand separators

• Decimal markers

• Negative numbers

• Leading zeros

⚡ Input Control

• Real-time validation

• Clear on non-match

• Show/hide mask typing

• Keep character positions

📅 Date & Time

• Leading zero handling

• AM/PM support

• Custom separators

• Multiple formats

🛠️ Customization

• Custom placeholders

• Special characters

• Transform functions

• Custom validation

📋 Form Integration

• Reactive Forms

• ControlValueAccessor

• Built-in validation

• Standalone support

Demo

Check out our live documentation and examples

Installation

# For Angular 17 and above
$ npm install ngx-mask    # Using npm
$ bun add ngx-mask       # Using bun

# For specific Angular versions:
# Angular 16.x.x
$ npm install [email protected]    # Using npm
$ bun add [email protected]       # Using bun

# Angular 15.x.x
$ npm install [email protected]    # Using npm
$ bun add [email protected]       # Using bun

# Angular 14.x.x
$ npm install [email protected]    # Using npm
$ bun add [email protected]       # Using bun

# Angular 13.x.x or 12.x.x
$ npm install [email protected]    # Using npm
$ bun add [email protected]       # Using bun

Package Manager Note: You can use either npm or bun based on your preference. Both package managers will work equally well with ngx-mask.

Version Compatibility

NGX-MASK follows Angular's official support policy, supporting Active and LTS versions. Currently supported:

  • Angular 17 and newer (latest features and updates)
  • For older Angular versions, use the corresponding NGX-MASK version as specified above

Note: Versions for Angular older than v17 will not receive new features or updates.

Quick Start

For Angular 15+ (Standalone)

Application-wide Setup with Default Config

bootstrapApplication(AppComponent, { providers: [provideEnvironmentNgxMask()] }).catch((err) =>
    console.error(err)
);

With Custom Configuration

import { NgxMaskConfig } from 'ngx-mask';

const maskConfig: Partial<NgxMaskConfig> = { validation: false };

bootstrapApplication(AppComponent, { providers: [provideEnvironmentNgxMask(maskConfig)] }).catch(
    (err) => console.error(err)
);

Feature-level Configuration

@Component({
    selector: 'my-feature',
    standalone: true,
    imports: [NgxMaskDirective],
    providers: [provideNgxMask()],
})
export class MyFeatureComponent {}

For Angular < 15 (NgModule)

Application-wide Setup with Default Config

import { NgxMaskModule } from 'ngx-mask';

@NgModule({ imports: [NgxMaskModule.forRoot()] })
export class AppModule {}

With Custom Configuration

import { NgxMaskModule, NgxMaskConfig } from 'ngx-mask';

const maskConfig: Partial<NgxMaskConfig> = { validation: false };

@NgModule({ imports: [NgxMaskModule.forRoot(maskConfig)] })
export class AppModule {}

Feature-level Configuration

import { NgxMaskModule } from 'ngx-mask';

@NgModule({ imports: [NgxMaskModule.forChild()] })
export class FeatureModule {}

Related Projects

Check out other projects by JSDaddy:

Contributing

We welcome contributions! Please read our contributing guidelines to learn about our development process and how you can propose bugfixes and improvements.