Svelte Input Mask

screenshot of Svelte Input Mask
svelte

Svelte Input Mask

Input masking component for Svelte with simple API and rich customization

Overview:

This project provides a simple API for masking input fields such as credit card numbers, phone numbers, dates, birthdays, and custom masks. It offers rich customization options to suit different use cases. The project also includes demos that demonstrate its functionality.

Features:

  • Mask various types of input: Supports masking for credit card numbers, phone numbers, dates, birthdays, and custom masks.
  • Customizable prefixes and country codes: Can change prefixes and country codes for phone numbers similar to credit card examples.
  • Flexible formatting options: Allows users to define their own mask strings or use a predefined mask format.
  • Control over input value: Users have control over the value of the input field, which is processed to match the specified mask.
  • Default value option: Supports setting a default value for the input field during the first render.
  • Show or hide mask: Users can choose to show or hide the mask based on the data entered in the input field.
  • Rich customization options: Offers a range of props to customize the mask input behavior.
svelte
Svelte

Svelte is a modern front-end framework that compiles your code at build time, resulting in smaller and faster applications. It uses a reactive approach to update the DOM, allowing for high performance and a smoother user experience.