{"id":18690785,"url":"https://github.com/vpodk/react-hamburger-drawer","last_synced_at":"2025-04-05T09:06:43.568Z","repository":{"id":37429566,"uuid":"408267121","full_name":"vpodk/react-hamburger-drawer","owner":"vpodk","description":"🍔 Simple lightweight react hamburger navigation drawer.","archived":false,"fork":false,"pushed_at":"2025-02-06T04:30:06.000Z","size":2232,"stargazers_count":29,"open_issues_count":5,"forks_count":21,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T08:06:20.762Z","etag":null,"topics":["hamburger","javascript","navigation-drawer","react"],"latest_commit_sha":null,"homepage":"https://npmjs.com/react-hamburger-drawer","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vpodk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":["Datamart"],"custom":["https://www.paypal.me/vpodk","https://amzn.to/3mpgAJh"]}},"created_at":"2021-09-20T00:18:57.000Z","updated_at":"2025-02-06T04:30:09.000Z","dependencies_parsed_at":"2023-11-12T04:24:21.758Z","dependency_job_id":"cc0a9cd6-cc4f-4054-8802-cecb58fcce45","html_url":"https://github.com/vpodk/react-hamburger-drawer","commit_stats":{"total_commits":170,"total_committers":3,"mean_commits":"56.666666666666664","dds":0.2705882352941177,"last_synced_commit":"1cb96d4e6183d51e86449110f5e4808d11182798"},"previous_names":["datamart/react-hamburger-drawer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpodk%2Freact-hamburger-drawer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpodk%2Freact-hamburger-drawer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpodk%2Freact-hamburger-drawer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpodk%2Freact-hamburger-drawer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vpodk","download_url":"https://codeload.github.com/vpodk/react-hamburger-drawer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312077,"owners_count":20918344,"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":["hamburger","javascript","navigation-drawer","react"],"created_at":"2024-11-07T10:50:47.816Z","updated_at":"2025-04-05T09:06:43.501Z","avatar_url":"https://github.com/vpodk.png","language":"CSS","funding_links":["https://github.com/sponsors/Datamart","https://www.paypal.me/vpodk","https://amzn.to/3mpgAJh"],"categories":[],"sub_categories":[],"readme":"# Navigation drawer\n\n[![Build Status](https://github.com/vpodk/react-hamburger-drawer/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/vpodk/react-hamburger-drawer/actions/workflows/npm-publish.yml) [![License](https://img.shields.io/:license-apache-blue.svg?logo=apache)](https://www.apache.org/licenses/LICENSE-2.0.html) [![NPM version](https://img.shields.io/npm/v/react-hamburger-drawer.svg?logo=npm)](https://npmjs.org/package/react-hamburger-drawer) [![NPM downloads](https://img.shields.io/npm/dm/react-hamburger-drawer.svg?style=flat)](https://npmjs.org/package/react-hamburger-drawer)\n\nSimple lightweight react hamburger navigation drawer (based on [navigation-drawer](https://github.com/vpodk/navigation-drawer)).\n\n### Key points\n\n- Hidden `\u003cinput type=\"checkbox\"\u003e` as a toggle;\n- Fullscreen `\u003clabel\u003e` element for veil;\n- Google Material spec for sizes, animations, and colors.\n\n### Accessibility\n\n- Support keyboard navigation (Tab, Esc and Enter);\n- Prevents page scrolling when the navigation drawer is open.\n\n### Usage example:\n\n```bash\nnpm install react-hamburger-drawer\n# Or\nyarn add react-hamburger-drawer\n```\n\n```js\nimport HamburgerDrawer from \"react-hamburger-drawer\";\n```\n\n```html\n\u003cdiv className=\"App\"\u003e\n  \u003cheader\u003e\n    \u003cHamburgerDrawer\u003e\n      \u003c!-- Your navigation drawer content here: --\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"/\"\u003eHome\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"/about\"\u003eAbout\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"/contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"/privacy-policy\"\u003ePrivacy Policy\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/HamburgerDrawer\u003e\n    \u003ch1\u003eYour Application Header\u003c/h1\u003e\n    ...\n  \u003c/header\u003e\n  ...\n\u003c/div\u003e\n```\n\n## Component props\n\n- `useFocusBounder` - An optional property to enable or disable [FocusBounder](https://github.com/wayfair-incubator/react-focus-bounder) component. Default `false`.\n\n## Next.js v13+ and other SSRs\n\n\u003e All components inside the app directory are React Server Components by default.\n\u003e To use `useRef` or `useEffect` hooks, the component must be marked as client component: `\"use client\"`.\n\nCreate a \"drawer.js\" file with the following content:\n\n```js\n\"use client\";\nimport HamburgerDrawer from \"react-hamburger-drawer\";\nexport default HamburgerDrawer;\n```\n\nAnd import the `HamburgerDrawer` component from the \"drawer.js\" module:\n\n```js\nimport HamburgerDrawer from \"./drawer\";\n```\n\nLinks:\n\n- https://nextjs.org/docs/messages/react-client-hook-in-server-component\n- https://nextjs.org/docs/app/building-your-application/rendering\n- https://react.dev/reference/react/use-client\n\n## Screenshots\n\n\u003ctable width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"70%\"\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/11623226/133954550-d8bc05e6-e1c1-4e66-bfbf-d28dc0a0f23a.gif\"/\u003e\n    \u003c/td\u003e\n    \u003ctd width=\"30%\"\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/11623226/133954776-70d1a7b1-b2e9-4b54-80c8-0f3bb2f94ec6.gif\"/\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvpodk%2Freact-hamburger-drawer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvpodk%2Freact-hamburger-drawer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvpodk%2Freact-hamburger-drawer/lists"}