{"id":13824523,"url":"https://github.com/ventralnet/v-hide","last_synced_at":"2025-07-28T09:07:33.280Z","repository":{"id":168468679,"uuid":"642168977","full_name":"ventralnet/v-hide","owner":"ventralnet","description":"Vue directive allowing you to hide an element on expression (visibility:hidden)","archived":false,"fork":false,"pushed_at":"2023-06-30T23:20:26.000Z","size":739,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-19T03:53:05.935Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ventralnet.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}},"created_at":"2023-05-18T01:20:55.000Z","updated_at":"2024-10-04T15:35:35.000Z","dependencies_parsed_at":"2024-01-08T08:56:26.220Z","dependency_job_id":null,"html_url":"https://github.com/ventralnet/v-hide","commit_stats":null,"previous_names":["ventralnet/v-hide"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ventralnet/v-hide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventralnet%2Fv-hide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventralnet%2Fv-hide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventralnet%2Fv-hide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventralnet%2Fv-hide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ventralnet","download_url":"https://codeload.github.com/ventralnet/v-hide/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventralnet%2Fv-hide/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267489790,"owners_count":24095804,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-04T09:01:04.234Z","updated_at":"2025-07-28T09:07:33.164Z","avatar_url":"https://github.com/ventralnet.png","language":"Vue","readme":"# v-hide\n\n## Overview\nv-hide is a Vue.js 2 and 3 directive that allows for conditional rendering maintaining rendered layout space in the DOM.\nSimply put... v-hide will add `visibility: hidden;` or `visibility: visible` styles based on a boolean vue expression\n\nLive Demo [V-Hide Demo](https://polite-bonbon-abd119.netlify.app/)\n\n## Purpose\nVue.js provides you with two conditional rendering options; v-if and v-show.  v-if will competely remove an item from\nthe DOM.  v-show will set `display: none` style which hides your item and removes it from the rendering of the DOM.\n\nThe key feature v-hide provides is to allow conditional rendering but also include the items dimensions if it is hidden.  More specifically v-hide will set the style `visibility: hidden;` or `visibility: visible`.  This may help with some layouts.  See the Live Demo [V-Hide Demo](https://polite-bonbon-abd119.netlify.app/) to show the conditional rendering options.\n\n# Important!\n\nFor vue2 use the npm ^1.0.0 version\n\nFor vue3 use the npm ^3.0.0 version\n\n## Installation\n\n### Vue2\n```Bash\nnpm install @ventralnet/v-hide@^1.0.0 --save\n```\n\n### Vue3\n```Bash\nnpm install @ventralnet/v-hide@^3.0.0 --save\n```\n\n```javascript\n/* \n  In vue2 (v-hide v^1.0.0) you don't need to add v-hide as a directive, just import the \n  dependency\n*/\nimport '@ventralnet/v-hide' // in your main vue entrypont\n\n/*\n In Vue 3 you need to import the directive definition and add it to your vue app\n*/\nimport vHide from '@ventralnet/v-hide';\n\n...\n\nconst myApp = createApp({...});\n\n...\n\nmyApp.directive('hide', vHide);\n\n\n...\n\n\u003cdiv v-hide=\"isThisHidden\"\u003e\u003c/div\u003e\n```\n\n## Sample Use\n\n```javascript\n\n\u003ctemplate\u003e\n   \u003cdiv v-hide=\"isHidden\"\u003eHi!\u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nimport '@ventralnet/v-hide'  // Import vHide in your main entry point after importing Vue\n                            // vHide will automatically add itself as a directive to the global Vue object\nexport default {\n  data() {\n    return {\n      isHidden: false,\n    };\n  }\n};\n\u003c/script\u003e\n```\n\n## Building\n```Bash\nnpm install\nnpm run test:unit\nnpm run serve # Serves the sample demo\nnpm run build # builds the library module to dist/\nnpm run build-example # builds the example site to dist/example\n```\n","funding_links":[],"categories":["Packages","Components \u0026 Libraries"],"sub_categories":["UI Utilities"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fventralnet%2Fv-hide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fventralnet%2Fv-hide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fventralnet%2Fv-hide/lists"}