Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

text-mask

> 前端框架
Open source

Input mask for React, Angular, Ember, Vue, & plain JavaScript

8.2K stars0 likes3 views
WebsiteGitHub

About

Input mask for React, Angular, Ember, Vue, & plain JavaScript

⚠️ This library is not maintained. Pull-requests and issues are not monitored. Below are some alternatives to text-mask (Please note that the alternatives below are not checked or verified by the maintainers of Text Mask):

  • https://github.com/uNmAnNeR/imaskjs
  • https://github.com/JsDaddy/ngx-mask
  • https://github.com/Tinkoff/maskito
  • https://github.com/mertohancan/react-text-mask-modern

If you know other alternatives that should be listed here, email me at [email protected].


Text Mask is an input mask library. It can create input masks for phone, date, currency, zip code, percentage, email, and literally anything!

There are convenient wrappers for React, Angular 2, Ember, and Vue.

Live demo

See it in action, check out the demo page.

Installation and usage

  • React
  • Angular 2 or Angular 1
  • Ember
  • Vue
  • Vanilla JS

Expected to work with...

IE9+, Android, Samsung Internet, Windows Phone, iOS, Opera, Firefox, Safari, and Chrome

Flexible

Text Mask is very configurable and allows you to create any type of input mask with minimal APIs. See the documentation for details.

Extendable

You can easily expand the base functionality of Text Mask with addons for more mask types. Checkout existing addons.

Robust

Text Mask supports pasting, browser auto-fill, and all operations that a user would expect while interacting with an input field.

It works on mobile, has no 3rd party dependencies, and has a tiny footprint (less than 4KB gzipped).

For any questions, suggestions, or feature requests

Please file an issue!

Issues· 331 open

View all issuesOpen on GitHub
  • #1093

    TS2786: 'MaskedInput' cannot be used as a JSX component.

    Updated Sep 19, 2025
  • #1019

    Importing TextMaskModule which does not have a ɵmod property

    Updated Feb 12, 2025
  • #230

    "Delete" key doesn't work as expected

    bugcoreUpdated Nov 14, 2024
  • #689

    [BUG] - US phone number with country code works incorrect

    bugcoreUpdated Oct 9, 2024
  • #1088

    Not Giving All Ten Numbers For Some Number

    Updated Aug 27, 2024
  • #1030

    "Delete" key on mac doesn't handle onChange method

    Updated Jul 23, 2024
  • #948

    Trailing zero padding

    Updated Jul 4, 2024
  • #897

    Extend config object for createAutoCorrectedDatePipe to accept min and max month and day

    Updated Jun 11, 2024
  • #1031

    Exponential numbers failer

    Updated May 26, 2024
  • #1080

    TextMaskModule couldn't be imported in Angular 16.

    Updated Dec 14, 2023

> Tags

JavaScriptangularemberinput-maskinputmask

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架