{"id":18404401,"url":"https://github.com/jordic/preact-sidenav","last_synced_at":"2025-04-07T07:32:55.588Z","repository":{"id":57329612,"uuid":"81110486","full_name":"jordic/preact-sidenav","owner":"jordic","description":"preact sidenav component","archived":false,"fork":false,"pushed_at":"2018-03-26T04:19:34.000Z","size":61,"stargazers_count":12,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-20T09:06:55.786Z","etag":null,"topics":["layout","material","preact","sidenav"],"latest_commit_sha":null,"homepage":null,"language":"CSS","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/jordic.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":"2017-02-06T17:02:28.000Z","updated_at":"2023-05-24T17:21:17.000Z","dependencies_parsed_at":"2022-09-16T18:00:56.277Z","dependency_job_id":null,"html_url":"https://github.com/jordic/preact-sidenav","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordic%2Fpreact-sidenav","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordic%2Fpreact-sidenav/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordic%2Fpreact-sidenav/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordic%2Fpreact-sidenav/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jordic","download_url":"https://codeload.github.com/jordic/preact-sidenav/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247612567,"owners_count":20966776,"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":["layout","material","preact","sidenav"],"created_at":"2024-11-06T02:51:40.877Z","updated_at":"2025-04-07T07:32:52.844Z","avatar_url":"https://github.com/jordic.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# preact-sidenav\n\nMinimal viable sidenav implementation.\n\n\u003e **[Demo](https://jsfiddle.net/jordic/sqj852y4/)**\n\n\nSize:\n\n| File | Size | Gzip |\n|------|------|----- |\n| js   | 2,1K | 902B |\n| css  | 2,3K | 626B |\n\n\n\n### Usage Example\n\nUse \u003cSidenav\u003e and provide content and a navigation var \n\n```js\nimport Sidenav from 'preact-sidenav';\n\nimport 'node_modules/preact-sidenav/dist/sidenav.css';\n\nconst Nav = (props) =\u003e (\n  \u003cdiv\u003e\n    \u003cul\u003e\n      \u003cli\u003eMenu item 1\u003c/li\u003e\n      \u003cli\u003eMenu item 2\u003c/li\u003e\n      \u003cli\u003eMenu item 3\u003c/li\u003e\n      \u003cli\u003e\u003cbutton onclick={props.closeSidenav} \u003eClose\u003c/button\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n\n  \u003c/div\u003e\n)\n\nclass App extends Component {\n\n  onOpen = () =\u003e console.log('open');\n  onClose = () =\u003e console.log('close');\n\n  render(props, state) {\n\t\treturn (\n      \u003cdiv id=\"app\"\u003e\n        \u003cSidenav sidebar={ \u003cNav /\u003e } onOpen={this.onOpen} onClose={this.onClose}\u003e\n          \u003cContent /\u003e\n        \u003c/Sidenav\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n\nrender(\u003cApp /\u003e, document.body);\n```\n\nScss file is also provided\n\n\n### License\n\n[MIT]\n\n[MIT]: http://choosealicense.com/licenses/mit/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordic%2Fpreact-sidenav","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjordic%2Fpreact-sidenav","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordic%2Fpreact-sidenav/lists"}