{"id":24383442,"url":"https://github.com/firstandthird/offcanvas","last_synced_at":"2025-08-20T16:07:33.584Z","repository":{"id":16167320,"uuid":"79478431","full_name":"firstandthird/offcanvas","owner":"firstandthird","description":"Javascript library for off canvas (mobile style) menus","archived":false,"fork":false,"pushed_at":"2023-05-12T09:17:35.000Z","size":1939,"stargazers_count":2,"open_issues_count":7,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-04T09:40:26.795Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/firstandthird.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-01-19T17:42:28.000Z","updated_at":"2024-08-15T07:15:41.000Z","dependencies_parsed_at":"2023-01-13T18:43:50.877Z","dependency_job_id":null,"html_url":"https://github.com/firstandthird/offcanvas","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Foffcanvas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Foffcanvas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Foffcanvas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Foffcanvas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firstandthird","download_url":"https://codeload.github.com/firstandthird/offcanvas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243259026,"owners_count":20262381,"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":[],"created_at":"2025-01-19T10:14:29.626Z","updated_at":"2025-03-12T17:20:46.870Z","avatar_url":"https://github.com/firstandthird.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eoffcanvas\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/firstandthird/offcanvas/actions\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/workflow/status/firstandthird/offcanvas/Lint/master?label=Lint\u0026style=for-the-badge\" alt=\"Lint Status\"/\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/offcanvas.svg?label=npm\u0026style=for-the-badge\" alt=\"NPM\" /\u003e\n\u003c/p\u003e\n\nJavascript library for off canvas (mobile style) menus.\n\n## Installation\n\n```sh\nnpm install offcanvas\n```\n\n_or_\n\n```sh\nyarn add offcanvas\n```\n\n## Usage\n\nUse the [CSS](example/offcanvas.css) that's shown on the example and customise to your needs. Keep `width` and `translate` similar.\n\n### HTML\n\n```html\n\u003cbody\u003e\n \u003cdiv class=\"offcanvas-wrapper\"\u003e\n    \u003cdiv class=\"offcanvas left\" data-offcanvas=\"navleft\"\u003e\n      \u003cp\u003ethis is the left nav\u003c/p\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"offcanvas-content\" data-offcanvas-content\u003e\n      \u003cbutton type=\"button\" data-offcanvas-trigger=\"navleft\"\u003eShow left nav\u003c/button\u003e\n      \u003cp\u003eDiam nascetur a natoque gravida odio scelerisque vitae ante ligula est cum convallis ullamcorper suspendisse magnis rutrum dignissim. Lorem a amet faucibus suscipit suspendisse ultrices adipiscing vestibulum morbi nibh habitasse gravida orci condimentum magnis eleifend condimentum leo a quisque condimentum phasellus eros accumsan. Vestibulum ut vestibulum a tempor adipiscing nec fringilla semper purus nisl rhoncus a bibendum a at condimentum. Gravida facilisi cras vivamus et class habitant lacinia ridiculus laoreet parturient sapien pulvinar dui parturient sociis dis augue litora himenaeos ante. Ante nunc a augue nam ullamcorper nulla tortor et rhoncus non scelerisque adipiscing himenaeos a ullamcorper parturient vivamus donec vestibulum vel potenti ultrices diam leo ac a dignissim. A pharetra sagittis vestibulum a condimentum aliquam tristique tincidunt ad lacinia a quisque non a ante.\u003c/p\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\u003c/body\u003e\n```\n\nIf you are using a fixed element to stick a navigation to the top, you can add the attribute `data-offcanvas-fixed` so once the offcanvas is shown it doesn't go to the top due to transform causing fixed elements to be absolute. See the [example](example/index.html) for more information.\n\n### CSS\n\n```css\n@import 'offcanvas/offcanvas.css';\n```\n### JavaScript\n\n```js\nimport 'offcanvas';\n```\n\n---\n\n\u003ca href=\"https://firstandthird.com\"\u003e\u003cimg src=\"https://firstandthird.com/_static/ui/images/safari-pinned-tab-62813db097.svg\" height=\"32\" width=\"32\" align=\"right\"\u003e\u003c/a\u003e\n\n_A [First + Third](https://firstandthird.com) Project_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Foffcanvas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirstandthird%2Foffcanvas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Foffcanvas/lists"}