{"id":22979403,"url":"https://github.com/jsdeveloperr/vue3-use-hooks","last_synced_at":"2025-08-13T17:32:40.510Z","repository":{"id":45801074,"uuid":"514603153","full_name":"jsdeveloperr/vue3-use-hooks","owner":"jsdeveloperr","description":"Vue Use Hooks implemented as vue composition functions 💥","archived":false,"fork":false,"pushed_at":"2022-07-28T20:12:07.000Z","size":178,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-15T08:43:34.868Z","etag":null,"topics":["hooks","typescript","vue","vue-hook","vue-hooks","vue-next","vue-use","vue-use-hooks","vue3","vue3-composition-api","vue3-hooks","vue3-typescript","vuejs","vuejs3"],"latest_commit_sha":null,"homepage":"https://vue3-use-hooks.vercel.app","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/jsdeveloperr.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}},"created_at":"2022-07-16T14:39:45.000Z","updated_at":"2024-06-05T13:14:03.000Z","dependencies_parsed_at":"2022-07-19T14:38:52.573Z","dependency_job_id":null,"html_url":"https://github.com/jsdeveloperr/vue3-use-hooks","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/jsdeveloperr%2Fvue3-use-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsdeveloperr%2Fvue3-use-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsdeveloperr%2Fvue3-use-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsdeveloperr%2Fvue3-use-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsdeveloperr","download_url":"https://codeload.github.com/jsdeveloperr/vue3-use-hooks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229772734,"owners_count":18121916,"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":["hooks","typescript","vue","vue-hook","vue-hooks","vue-next","vue-use","vue-use-hooks","vue3","vue3-composition-api","vue3-hooks","vue3-typescript","vuejs","vuejs3"],"created_at":"2024-12-15T01:30:35.972Z","updated_at":"2024-12-15T01:31:05.251Z","avatar_url":"https://github.com/jsdeveloperr.png","language":"Vue","readme":"# :boom: Vue3 Use Hooks\n\n\u003e \u003cp\u003eReusability and Composition functions.\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![npm](https://img.shields.io/npm/v/vue3-use-hooks?style=flat-square)](https://www.npmjs.com/package/vue3-use-hooks)\n![npm bundle size](https://img.shields.io/bundlephobia/minzip/vue3-use-hooks?style=flat-square)\n![npm](https://img.shields.io/npm/dt/vue3-use-hooks?style=flat-square)\n![GitHub license](https://img.shields.io/npm/l/vue3-use-hooks?style=flat-square)\n\n\u003c/div\u003e\n\n## :books: Introduction\n\nVue Use Hooks implemented as vue composition functions.\n\n## :rocket: Example\n\nCheck our 👉 [example](https://vue3-use-hooks.vercel.app/)\n\n## :package: Installation\n\n```bash\n# install with yarn\nyarn add vue3-use-hooks\n# install with npm\nnpm install vue3-use-hooks\n# install with pnpm \npnpm add vue3-use-hooks\n```\n\n## :sparkles: useLocalStorage\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nimport { useLocalStorage } from 'vue3-use-hooks';\nconst { value, remove } = useLocalStorage('test', '1');\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    \u003cp\u003e\u003cb\u003eValue is: \u003c/b\u003e {{ value }}\u003c/p\u003e\n    \u003cbutton class=\"fourth\" @click=\"value = '2'\"\u003eChange\u003c/button\u003e\n    \u003cbutton class=\"first\" @click=\"remove\"\u003eRemove\u003c/button\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n```\n\n## :sparkles: useState\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nimport { useState } from 'vue3-use-hooks';\nconst [count, setCount] = useState(0);\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    \u003cp\u003e\u003cb\u003eCount: \u003c/b\u003e {{ count }}\u003c/p\u003e\n    \u003cbutton class=\"fourth\" @click=\"count - 1 \u003e= 0 \u0026\u0026 setCount(count - 1)\"\u003eDecrement\u003c/button\u003e\n    \u003cbutton class=\"fourth\" @click=\"setCount(count + 1)\"\u003eIncrement\u003c/button\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n```\n\n## :sparkles: useStringCase\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nimport { reactive } from 'vue';\nimport { useStringCase } from 'vue3-use-hooks';\n\nconst state = reactive({\n  name: 'imelda white',\n  gender: 'female',\n  company: 'NEUROCELL',\n  email: 'Imeldawhite@nr.com',\n  balance: '3,814.49',\n  about: 'Veniam fugiat pariatur adipisicing do consequat.',\n  address: 'bulwer place, lemoyne, district of columbia, 5597'\n});\n\nconst { camelCase, kebabCase, pascalCase, upperCase, lowerCase, sentenceCase, capitalizeCase } =\n  useStringCase();\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    \u003cp\u003e\u003cb\u003eCamelCase: \u003c/b\u003e{{ camelCase(state.about) }}\u003c/p\u003e\n    \u003cp\u003e\u003cb\u003eCapitalizeCase: \u003c/b\u003e{{ capitalizeCase(state.name) }}\u003c/p\u003e\n    \u003cp\u003e\u003cb\u003eSentenceCase: \u003c/b\u003e{{ sentenceCase(state.company) }}\u003c/p\u003e\n    \u003cp\u003e\u003cb\u003eKebabCase: \u003c/b\u003e{{ kebabCase(state.balance) }}\u003c/p\u003e\n    \u003cp\u003e\u003cb\u003ePascalCase: \u003c/b\u003e{{ pascalCase(state.address) }}\u003c/p\u003e\n    \u003cp\u003e\u003cb\u003eLowerCase: \u003c/b\u003e{{ lowerCase(state.email) }}\u003c/p\u003e\n    \u003cp\u003e\u003cb\u003eUpperCase: \u003c/b\u003e{{ upperCase(state.gender) }}\u003c/p\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n```\n\n## :sparkles: useEmbed\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nimport { ref } from 'vue';\nimport { useEmbed } from 'vue3-use-hooks';\nconst code = ref(null);\nconst { isEmbedBlock, clear } = useEmbed(code);\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cdiv class=\"example-container\"\u003e\n    \u003cdiv class=\"flex-container\"\u003e\n      \u003ctextarea rows=\"5\" cols=\"50\" placeholder=\"Place embed code here\" v-model=\"code\"\u003e\u003c/textarea\u003e\n      \u003cbutton type=\"button\" class=\"clear-button\" @click=\"clear\"\u003eClear\u003c/button\u003e\n    \u003c/div\u003e\n    \u003cdiv v-if=\"isEmbedBlock\" v-html=\"code\" class=\"embed-block\"\u003e\u003c/div\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n```\n\n## :sparkles: useModal\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nimport { useModal } from 'vue3-use-hooks';\n\nconst contrubitors = [\n  {\n    id: 1,\n    emoji: '👨',\n    fullname: 'Abdulnasır Olcan',\n    programmer: 'Frontend Developer'\n  },\n  {\n    id: 2,\n    emoji: '👩',\n    fullname: 'Büşra Şanlıbayrak',\n    programmer: 'Frontend Developer'\n  },\n  {\n    id: 3,\n    emoji: '🧑‍',\n    fullname: 'Mehmet Varol',\n    programmer: 'Frontend Developer'\n  }\n];\nconst { visible, setVisible, current, openModal, closeModal } = useModal();\n\nconst handleButton = () =\u003e {\n  openModal(contrubitors);\n  setVisible(true);\n};\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cdiv class=\"modal-vue\"\u003e\n    \u003c!-- button show --\u003e\n    \u003cbutton class=\"btn fourth\" @click=\"handleButton\"\u003eshow model\u003c/button\u003e\n\n    \u003c!-- overlay --\u003e\n    \u003cdiv class=\"overlay\" v-if=\"visible\"\u003e\u003c/div\u003e\n\n    \u003c!-- modal --\u003e\n    \u003cdiv class=\"modal\" v-if=\"visible\"\u003e\n      \u003cdiv class=\"modal-header\"\u003eModal Header\u003c/div\u003e\n      \u003cbutton class=\"close\" @click=\"closeModal\"\u003ex\u003c/button\u003e\n      \u003cdiv class=\"modal-content\" v-for=\"contrubitor in current\" :key=\"contrubitor.id\"\u003e\n        \u003cul\u003e\n          \u003cli\u003e\n            \u003cp\u003e{{ contrubitor.emoji }}\u003c/p\u003e\n            \u003ch1\u003e{{ contrubitor.fullname }}\u003c/h1\u003e\n            \u003cspan\u003e{{ contrubitor.programmer }}\u003c/span\u003e\n          \u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"modal-footer\"\u003eModal Footer\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n```\n## 📄 License\n\n\u003cdiv calign=\"center\"\u003e\n    🍁 MIT Licensed | Copyright © 2022-present Abdulnasır Olcan and @Vue3UseHooks contributors\n\u003c/div\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsdeveloperr%2Fvue3-use-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsdeveloperr%2Fvue3-use-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsdeveloperr%2Fvue3-use-hooks/lists"}