{"id":23602733,"url":"https://github.com/kerimkuscu/mask-input","last_synced_at":"2025-07-03T09:08:47.964Z","repository":{"id":257600715,"uuid":"858764902","full_name":"kerimkuscu/mask-input","owner":"kerimkuscu","description":"mask-input is a Vue.js component library that provides an easy-to-use input masking solution. With flexible masking options, you can format user input for phone numbers, credit cards, dates, and more. This library offers a seamless way to enforce input formats and ensure data consistency in your Vue.js applications.","archived":false,"fork":false,"pushed_at":"2024-12-16T14:28:00.000Z","size":106,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T03:19:11.373Z","etag":null,"topics":["form-controls","form-validation","frontend","frontend-development","javascript","mask-input","open-source","typescript","vue-components","vue-directive","vue3","vuejs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/my-mask-library?activeTab=readme","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kerimkuscu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-17T13:51:01.000Z","updated_at":"2025-02-04T14:02:53.000Z","dependencies_parsed_at":"2025-05-08T21:59:01.345Z","dependency_job_id":null,"html_url":"https://github.com/kerimkuscu/mask-input","commit_stats":null,"previous_names":["kerimkuscu/mask-input"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kerimkuscu/mask-input","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerimkuscu%2Fmask-input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerimkuscu%2Fmask-input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerimkuscu%2Fmask-input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerimkuscu%2Fmask-input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kerimkuscu","download_url":"https://codeload.github.com/kerimkuscu/mask-input/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerimkuscu%2Fmask-input/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263296642,"owners_count":23444498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["form-controls","form-validation","frontend","frontend-development","javascript","mask-input","open-source","typescript","vue-components","vue-directive","vue3","vuejs"],"created_at":"2024-12-27T12:12:55.249Z","updated_at":"2025-07-03T09:08:47.944Z","avatar_url":"https://github.com/kerimkuscu.png","language":"Vue","funding_links":["https://buymeacoffee.com/kerimkuscu"],"categories":[],"sub_categories":[],"readme":"# My Mask Library\n\n## 🚀 Overview\n\n`mask-input` is a Vue.js component library that provides an easy-to-use input masking solution. With flexible masking options, you can format user input for phone numbers, credit cards, dates, and more. This library offers a seamless way to enforce input formats and ensure data consistency in your Vue.js applications.\n\n## 📦 Installation\n\nTo get started with `mask-input`, follow these steps:\n\n### 1. Install the Package\n\nYou can install the library via npm or yarn:\n\n#### Using npm\n\n```bash\nnpm install my-mask-library\nor\nyarn add my-mask-library\n```\n## 📘 Usage\nOnce installed, you can import and use the MaskInputComponent in your Vue.js application. Here's a step-by-step guide on how to integrate it:\n\n### 1. Import and Register the Component\nIn your main entry file (e.g., main.js or main.ts), import the MaskInputComponent and register it globally or locally in your components.\n\n#### Global Registration\n```bash\nimport { createApp } from 'vue';\nimport App from './App.vue';\nimport MaskInputComponent from 'my-mask-library';\n\n// Create your Vue app\nconst app = createApp(App);\n\n// Register the component globally\napp.component('MaskInputComponent', MaskInputComponent);\n\n// Mount the app\napp.mount('#app');\n```\n\n#### Local Registration\nIn the component where you want to use the masked input:\n```bash\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    \u003cMaskInputComponent\n      v-model=\"maskedValue\"\n      mask=\"(###) ###-####\"\n      type=\"text\"\n      className=\"masked-input\"\n    /\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript lang=\"ts\"\u003e\nimport { defineComponent, ref } from 'vue';\nimport MaskInputComponent from 'mask-input';\n\nexport default defineComponent({\n  components: {\n    MaskInputComponent\n  },\n  setup() {\n    const maskedValue = ref('');\n    return {\n      maskedValue\n    };\n  }\n});\n\u003c/script\u003e\n```\n\n### 2. Component Props\n   The MaskInputComponent accepts the following props:\n\n- mask (String, Required): The mask pattern to be applied to the input. Example: \"(###) ###-####\".\n- type (String, Optional): The type of the input. Defaults to \"text\".\n- className (String, Optional): Additional CSS class names to apply to the input.\n- placeholder (String, Optional): Placeholder text for the input. Defaults to an empty string.\n- disabled (Boolean, Optional): Disables the input if set to true. Defaults to false.\n- name (String, Optional): The name attribute for the input. Defaults to an empty string.\n- id (String, Optional): The id attribute for the input. Defaults to an empty string.\n- autocomplete (String, Optional): The autocomplete attribute for the input. Defaults to \"off\".\n- readonly (Boolean, Optional): Makes the input read-only if set to true. Defaults to false.\n\n### 3. Handling Events\n   The component emits the following event:\n\nupdate:modelValue: Emitted when the masked value changes. You can use this event to update your model value or handle changes in your application.\n\n```bash\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    \u003cMaskInputComponent\n      v-model=\"maskedValue\"\n      mask=\"####-####-####-####\"\n      @update:modelValue=\"handleUpdate\"\n    /\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript lang=\"ts\"\u003e\nimport { defineComponent, ref } from 'vue';\nimport MaskInputComponent from 'mask-input';\n\nexport default defineComponent({\n  components: {\n    MaskInputComponent\n  },\n  setup() {\n    const maskedValue = ref('');\n\n    function handleUpdate(newValue: string) {\n      console.log('Updated masked value:', newValue);\n      maskedValue.value = newValue;\n    }\n\n    return {\n      maskedValue,\n      handleUpdate\n    };\n  }\n});\n\u003c/script\u003e\n```\n## 📝 Contributing\nWe welcome contributions! If you have any ideas, suggestions, or bug fixes, please feel free to open an issue or submit a pull request.\n\n## 🔗 License\nThis project is licensed under the MIT License.\n\n##  ☕ Support Me\n\nIf you like my work and want to support me, you can buy me a coffee! 😊\n\n[![Buy Me a Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoffee.com/kerimkuscu)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerimkuscu%2Fmask-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkerimkuscu%2Fmask-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerimkuscu%2Fmask-input/lists"}