{"id":18653574,"url":"https://github.com/wahawaher/wdrawer","last_synced_at":"2025-11-05T16:30:26.268Z","repository":{"id":126553312,"uuid":"313680291","full_name":"WahaWaher/wdrawer","owner":"WahaWaher","description":"Navigation drawer in pure JS (umd, es5)","archived":false,"fork":false,"pushed_at":"2020-11-17T20:47:57.000Z","size":134,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T02:36:09.730Z","etag":null,"topics":["drawer","js","menu","navigation-drawer","plugin","pure-javascript","umd"],"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/WahaWaher.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}},"created_at":"2020-11-17T16:37:41.000Z","updated_at":"2020-12-16T13:30:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"78c71ce3-4c35-486f-9a4e-dbbdf69f4b54","html_url":"https://github.com/WahaWaher/wdrawer","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"9fdc18b08cf0d0fb2268c035259fb55dd4afd988"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WahaWaher%2Fwdrawer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WahaWaher%2Fwdrawer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WahaWaher%2Fwdrawer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WahaWaher%2Fwdrawer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WahaWaher","download_url":"https://codeload.github.com/WahaWaher/wdrawer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239467156,"owners_count":19643601,"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":["drawer","js","menu","navigation-drawer","plugin","pure-javascript","umd"],"created_at":"2024-11-07T07:12:19.250Z","updated_at":"2025-11-05T16:30:26.231Z","avatar_url":"https://github.com/WahaWaher.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"wDrawer \u003csup\u003e1.0.3\u003c/sup\u003e\n-------\nNavigation drawers provide access to destinations in your app.\nSide sheets are surfaces containing supplementary content that are anchored to the left or right edge of the screen.\n\n* Pure JS, UMD, ES5\n* Has backdrop element\n* Has page shifting mode\n\n## Install:\n```sh\n# NPM\nnpm i wdrawer\n# YARN\nyarn add wdrawer\n```\n\n## Basic usage:\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003clink rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/WahaWaher/wdrawer/dist/wdrawer.min.css\"\u003e\n  \u003c/head\u003e\n\u003cbody\u003e\n  \n  \u003cbutton class=\"app-drawer-switch\"\u003eDrawer Switch\u003c/button\u003e\n\n  \u003cdiv class=\"app-drawer\" style=\"display:none\"\u003e\n    Drawer content...\n  \u003c/div\u003e\n  \n  \u003cscript src=\"https://cdn.jsdelivr.net/gh/WahaWaher/wdrawer/dist/wdrawer.umd.es5.min.js\"\u003e\u003c/script\u003e\n  \u003cscript\u003e\n    window.addEventListener('load', function() {\n    \n      // Init\n      const appDrawer = new WDrawer('.app-drawer', {\n        // Options...\n      });\n    \n      // Switch\n      document.querySelector('.app-drawer-switch').addEventListener('click', function() {\n        appDrawer.switch();\n      });\n    \n    });\n  \u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Options, Methods, Events:\n```js\n// Init\nconst appDrawer = new WDrawer('.app-drawer', {\n  // Options...\n});\n\n// Default options:\nconst defaults = {\n  width: 275, // drawer width, px\n  position: 'right', // drawer appearing from \"left\" or \"right\"\n  prefix: null, // prefix for main classes\n  page: null, // selector of page content node or null if page shifting not used\n  open: false, // initial state, true - open, false - close\n};\n\n// Properties\nappDrawer.defaults; // default settings\nappDrawer.nodes; // layout nodes\nappDrawer.settings; // actual settings\nappDrawer.state; // drawer state\n\n// Methods\nappDrawer.open();\nappDrawer.close();\nappDrawer.switch();\n\n// Events:\ndocument.querySelector('.app-drawer').addEventListener('wdrawer.open', (e) =\u003e {\n  const instance = e.detail.instance;\n  const { defaults, nodes, settings, state } = instance;\n  \n  console.log('Before drawer open', instance, defaults, nodes, settings, state);\n});\n\ndocument.querySelector('.app-drawer').addEventListener('wdrawer.close', (e) =\u003e {\n  const instance = e.detail.instance;\n  const { defaults, nodes, settings, state } = instance;\n  \n  console.log('Before drawer close', instance, defaults, nodes, settings, state);\n});\n```\n\n## License (MIT)\nCopyright (c) 2018-2020 Sergey Kravchenko\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwahawaher%2Fwdrawer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwahawaher%2Fwdrawer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwahawaher%2Fwdrawer/lists"}