{"id":20455879,"url":"https://github.com/formspark/vue-use-formspark","last_synced_at":"2025-04-13T03:42:43.403Z","repository":{"id":47859864,"uuid":"368246064","full_name":"formspark/vue-use-formspark","owner":"formspark","description":"Vue composition API functions for Formspark","archived":false,"fork":false,"pushed_at":"2021-12-08T08:17:49.000Z","size":1069,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T20:51:34.103Z","etag":null,"topics":["form","forms","jamstack","static","vue"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/formspark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-17T16:04:53.000Z","updated_at":"2023-10-18T14:27:56.000Z","dependencies_parsed_at":"2022-09-12T16:04:49.912Z","dependency_job_id":null,"html_url":"https://github.com/formspark/vue-use-formspark","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formspark%2Fvue-use-formspark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formspark%2Fvue-use-formspark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formspark%2Fvue-use-formspark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formspark%2Fvue-use-formspark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/formspark","download_url":"https://codeload.github.com/formspark/vue-use-formspark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248661163,"owners_count":21141406,"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","forms","jamstack","static","vue"],"created_at":"2024-11-15T11:20:17.748Z","updated_at":"2025-04-13T03:42:43.378Z","avatar_url":"https://github.com/formspark.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://formspark.io\"\u003e\n        \u003cimg width=\"64\" src=\"https://cdn.formspark.io/images/formspark/logos/formspark.svg\" alt=\"Formspark logo\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003evue-use-formspark\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    Vue composition API functions for \u003ca href=\"https://formspark.io\"\u003eFormspark\u003c/a\u003e.\n\u003c/p\u003e \n\n[![Continuous deployment](https://github.com/formspark/vue-use-formspark/workflows/Continuous%20deployment/badge.svg)](https://github.com/formspark/vue-use-formspark/actions?query=workflow%3A%22Continuous+deployment%22)\n\n## Installation\n\n```bash\n# NPM\nnpm install @formspark/vue-use-formspark\n\n# Yarn \nyarn add @formspark/vue-use-formspark\n```\n\n## Usage\n\n```vue\n\u003ctemplate\u003e\n  \u003cform @submit=\"onSubmit\"\u003e\n    \u003ctextarea v-model=\"message\" @input=\"onInput\"/\u003e\n    \u003cbutton type=\"submit\" :disabled=\"submitting\"\u003eSend\u003c/button\u003e\n  \u003c/form\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nimport { ref } from \"vue\";\nimport { useFormspark } from \"@formspark/vue-use-formspark\";\nexport default {\n  setup() {\n    const message = ref(\"\");\n    \n    const [submit, submitting] = useFormspark({\n      formId: \"your-form-id\"\n    });\n\n    const onInput = e =\u003e {\n      message.value = e.target.value;\n    };\n    \n    const onSubmit = async e =\u003e {\n      e.preventDefault();\n      await submit({ message: message.value })\n      message.value = \"\";\n    };\n    \n    return {\n      message,\n      onInput,\n      onSubmit,\n      submitting,\n    };\n  }\n};\n\u003c/script\u003e\n```\n\n**Note:** do not mistake action url (e.g. `https://submit-form.com/capybara`) and form id (e.g. `capybara`), this\npackage only uses the latter.\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fformspark%2Fvue-use-formspark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fformspark%2Fvue-use-formspark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fformspark%2Fvue-use-formspark/lists"}