{"id":13809918,"url":"https://github.com/PaulMaly/svelte-imask","last_synced_at":"2025-05-14T10:31:48.057Z","repository":{"id":34126318,"uuid":"169688645","full_name":"PaulMaly/svelte-imask","owner":"PaulMaly","description":"IMask input component and action for Svelte 3","archived":false,"fork":false,"pushed_at":"2022-07-15T16:37:05.000Z","size":165,"stargazers_count":66,"open_issues_count":12,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-28T14:06:40.655Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/PaulMaly.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-08T05:17:13.000Z","updated_at":"2025-01-15T22:42:16.000Z","dependencies_parsed_at":"2022-08-08T00:01:14.918Z","dependency_job_id":null,"html_url":"https://github.com/PaulMaly/svelte-imask","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulMaly%2Fsvelte-imask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulMaly%2Fsvelte-imask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulMaly%2Fsvelte-imask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulMaly%2Fsvelte-imask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PaulMaly","download_url":"https://codeload.github.com/PaulMaly/svelte-imask/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254120624,"owners_count":22018024,"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":[],"created_at":"2024-08-04T02:00:39.602Z","updated_at":"2025-05-14T10:31:43.556Z","avatar_url":"https://github.com/PaulMaly.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# svelte-imask\n\nIMask input component and action for [Svelte 3](https://svelte.dev). [demo](https://svelte.dev/repl/de6a6dcc92ee43d19ad2274599ba34c8?version=3.12.1)\n\n## Usage\n\nInstall with npm or yarn:\n\n```bash\nnpm install --save svelte-imask\n```\n\n## Parameters\n\nAny options of imask can be passed to action as options or MaskedComponent via `options` prop.\n\nThen import `MaskedInput` component to your Svelte app. `options` prop will be passed to `imask` action. Any other props will be assigned to input element itself.\n\n```html\n\u003clabel\u003e\n  \u003cMaskedInput \n    bind:value={tel} \n    options={options} \n    on:complete={complete} \n    name=\"phone\" \n    type=\"tel\"\n  /\u003e\n\u003c/label\u003e\n \n\u003cscript\u003e\n  import { MaskedInput } from 'svelte-imask';\n\n  const options = {\n\t\tmask: '+{7}(000)000-00-00'\n  };\n  \n  let tel;\n\n  function complete({ detail: imask }) {\n    console.log('completed', imask);\n  }\n\u003c/script\u003e\n```\n\nOR import `imask` action to get full control.\n\n```html\n\u003clabel\u003e\n  \u003cinput \n    use:imask={options} \n    on:accept={accept} \n    on:complete={complete} \n    name=\"phone\" \n    type=\"tel\"\n  \u003e\n\u003c/label\u003e\n \n\u003cscript\u003e\n  import { imask } from 'svelte-imask';\n\n  const options = {\n\t\tmask: '+{7}(000)000-00-00'\n  };\n\n  function accept({ detail: imask }) {\n    console.log('accepted', imask);\n  }\n\n  function complete({ detail: imask }) {\n    console.log('completed', imask);\n  }\n\u003c/script\u003e\n```\n\n## Events\n\n- `accept` - event fires on input when the value has changed (imask instance in `event.detail`)\n- `complete` - event fires when the value is completely filled (imask instance in `event.detail`)\n\n## License\n\nMIT \u0026copy; [PaulMaly](https://github.com/PaulMaly)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPaulMaly%2Fsvelte-imask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPaulMaly%2Fsvelte-imask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPaulMaly%2Fsvelte-imask/lists"}