# nosir/cleave.js

Format input text content when you are typing...

Repository: https://github.com/nosir/cleave.js
Canonical: https://ross.abutalabs.com/products/cleavejs
Homepage: http://nosir.github.io/cleave.js
Language: JavaScript
License: Apache-2.0
License Family: permissive
Topics: input, input-mask, credit-card, creditcard, telephone-number
Last push: 2023-11-25T10:40:46+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3759, "days_push": 1012, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 17859, forks 1567 (observed 2026-08-28T04:11:20.490400+00:00)

## What it is
Cleave.js is a JavaScript library that automatically formats text input fields as the user types, supporting credit card numbers, phone numbers, dates, times, numerals, and custom block patterns. It ships as a vanilla JS library with React and AngularJS integrations, but is now deprecated in favor of cleave-zen.

## Use cases
- format credit card numbers as users type in a payment form
- format phone numbers with country-specific patterns
- format date and time inputs like YYYY-MM-DD
- format large numbers with thousand separators
- apply custom delimiter and block patterns to input fields
- add input masking to a React form

## When to choose
- you need lightweight, dependency-free input formatting in vanilla JS or React
- you want automatic credit card, phone, date, or numeral formatting without writing regex masks
- you are maintaining a legacy project already using Cleave.js

## When to avoid
- you are starting a new project - the library is deprecated and its author recommends cleave-zen
- you need full validation or sanitization - Cleave only formats, it does not validate
- you need a maintained library with active bug fixes and framework support beyond React/AngularJS 1.x

## Facets
- artifact type: library
- maturity: abandoned
- function: form-handling, ui-components
- domain: web-development, frontend
- platform: browser, cross-platform
- tags: input-mask, input-formatting, credit-card, phone-number, deprecated, react, angularjs, vanilla-js, nodejs

## Member repositories
- nosir/cleave.js (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:20.490400+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:02:26.181038+00:00, confidence not recorded.
  - readme: https://github.com/nosir/cleave.js (fetched 2026-08-28T04:11:20.490400+00:00, sha 65be1e5c9047)
  - homepage: http://nosir.github.io/cleave.js (fetched 2026-08-29T08:00:51.389997+00:00, sha 68be48d13339)
  - registry_npm: https://registry.npmjs.org/cleave.js (fetched 2026-08-29T08:00:51.393359+00:00, sha f865de8c1de1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
