awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
nosir avatar

nosir/cleave.js

0
View on GitHub↗
17,867 stars·1,580 forks·JavaScript·Apache-2.0·11 viewsnosir.github.io/cleave.js↗

Cleave.js

Cleave.js is a JavaScript library that applies real-time visual formatting to form fields as users type. It provides specialized utilities to enforce visual patterns for credit cards, phone numbers, dates, times, and large numerals.

The library includes predefined formatting rules for common data types, such as detecting credit card issuers to apply correct spacing and managing country-specific regional patterns for international phone numbers. It also supports large numeral grouping using Western, Indian, and Chinese numbering systems.

Users can define custom input patterns using specific block lengths, delimiters, and prefixes to create specialized text constraints. The toolset also covers input management, allowing for the retrieval of both formatted and raw field values, programmatic value updates, and the cleanup of active event listeners.

Features

  • Real-time Input Formatting - Provides a JavaScript library for applying real-time visual formatting to form fields as users type.
  • Date Formatting Utilities - Implements real-time date formatting and pattern enforcement for consistent user entry in form fields.
  • Configuration-Driven Logic - Uses configuration schemas to determine how different input types should be formatted with delimiters and blocks.
  • State Mapping - Maintains a separation between the raw user input and the formatted display string to ensure data integrity.
  • String Tokenization - Breaks input strings into discrete blocks of predefined lengths to insert delimiters at specific intervals.
  • Credit Card Formatters - Provides real-time credit card number formatting with automatic issuer detection and appropriate spacing.
  • Phone Number Formatting - Applies country-specific regional patterns and spacing to phone number inputs in real-time.
  • Temporal Input Patterns - Enforces standardized time patterns as users type to ensure consistent data entry.
  • Event Interception Utilities - Intercepts DOM input events to apply visual formatting patterns before the text is rendered to the screen.
  • Numeric Formatting - Applies locale-specific thousands separators and numeric formatting for large numerals during user input.
  • Input Masking - Enforces consistent visual patterns for dates and times in form fields to prevent user entry errors.
  • Date and Time Utilities - Enforces standardized date and time patterns in text inputs to ensure consistent data entry.
  • Input Masking - Constrains text entry using specific block lengths, custom delimiters, and prefixes to create specialized patterns.
  • Card Issuer Detection - Automatically detects credit card issuers using bank prefixes to switch to the correct spacing and formatting rules.
  • Formatters - Detects card issuers and applies correct spacing and delimiters to credit card input fields.
  • Formatting - Applies correct spacing and formatting to credit card number inputs based on detected issuers.
  • Field Customization - Provides tools to create strict visual structures and constraints for text inputs using custom block lengths and delimiters.
  • Input Value Extractors - Enables extraction of either the formatted display string or the raw underlying value from input fields.
  • Numeric Grouping - Inserts thousands separators using Western, Indian, and Chinese numbering systems for better readability of large numerals.
  • Numeric Inputs - Provides a specialized tool for inserting thousands separators using various international numbering styles in numeric inputs.
  • Programmatic Input Formatters - Automatically applies configured formatting patterns when the raw value of a field is programmatically set.

Star history

Star history chart for nosir/cleave.jsStar history chart for nosir/cleave.js

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Cleave.js

Similar open-source projects, ranked by how many features they share with Cleave.js.
  • s-yadav/react-number-formats-yadav avatar

    s-yadav/react-number-format

    4,091View on GitHub↗

    This library provides a set of tools for formatting numeric values and masking user input within React components. It includes a customizable text input wrapper that synchronizes raw numeric values with formatted display strings and a specialized input masking component for enforcing string patterns and templates during data entry. The project features a localized number formatter that utilizes browser localization APIs to apply regional grouping, prefixes, and suffixes. It supports specialized financial formatting, such as displaying negative values in parentheses, and provides the ability t

    JavaScript
    View on GitHub↗4,091
  • marmelab/react-adminmarmelab avatar

    marmelab/react-admin

    26,780View on GitHub↗

    React-admin is a framework for building data-driven administrative interfaces that connect to REST or GraphQL backends. It provides a comprehensive suite of tools for managing the full lifecycle of administrative applications, including resource-oriented routing, declarative form scaffolding, and context-driven state management. By utilizing a modular adapter-based architecture, the framework abstracts backend communication, allowing developers to build consistent CRUD interfaces that handle data fetching, authentication, and synchronization automatically. The project distinguishes itself thr

    TypeScriptadminadmin-dashboardadmin-on-rest
    View on GitHub↗26,780
  • jessepollak/cardjessepollak avatar

    jessepollak/card

    11,712View on GitHub↗

    This project provides a visual credit card form UI component and payment input visualizer. It creates an interactive checkout interface that displays a dynamic visual representation of a credit card, updating in real time as users enter payment details into a form. The interface includes localized payment capabilities, allowing the replacement of default labels and validation messages with custom strings to support multiple languages. Users can customize visual fields and input placeholders to control the default text and symbols displayed during the checkout process. The system manages real

    SCSScoffeescriptcredit-cardcss
    View on GitHub↗11,712
  • date-fns/date-fnsdate-fns avatar

    date-fns/date-fns

    36,579View on GitHub↗

    date-fns is a JavaScript date utility library providing a collection of pure functions for manipulating, formatting, and calculating dates and times. It serves as an immutable date manipulation library and a tool for time zone management, ensuring that date transformations are performed without modifying the original date objects. The library functions as a date formatting tool that converts date objects into human-readable strings using custom patterns and international locales. It includes a specific toolset for adjusting and calculating date representations across different geographical re

    TypeScriptdatedate-fnshacktoberfest
    View on GitHub↗36,579
See all 30 alternatives to Cleave.js→

Frequently asked questions

What does nosir/cleave.js do?

Cleave.js is a JavaScript library that applies real-time visual formatting to form fields as users type. It provides specialized utilities to enforce visual patterns for credit cards, phone numbers, dates, times, and large numerals.

What are the main features of nosir/cleave.js?

The main features of nosir/cleave.js are: Real-time Input Formatting, Date Formatting Utilities, Configuration-Driven Logic, State Mapping, String Tokenization, Credit Card Formatters, Phone Number Formatting, Temporal Input Patterns.

What are some open-source alternatives to nosir/cleave.js?

Open-source alternatives to nosir/cleave.js include: s-yadav/react-number-format — This library provides a set of tools for formatting numeric values and masking user input within React components. It… marmelab/react-admin — React-admin is a framework for building data-driven administrative interfaces that connect to REST or GraphQL… jessepollak/card — This project provides a visual credit card form UI component and payment input visualizer. It creates an interactive… date-fns/date-fns — date-fns is a JavaScript date utility library providing a collection of pure functions for manipulating, formatting,… unmanner/imaskjs — imaskjs is a JavaScript input mask library and DOM input manager used to enforce specific patterns, data types, and… googlei18n/libphonenumber — This project is an international phone number library providing tools for parsing, formatting, and validating phone…