{"id":21387495,"url":"https://github.com/nju33/apoc-sidebar","last_synced_at":"2026-05-04T16:36:47.773Z","repository":{"id":57182270,"uuid":"86503994","full_name":"nju33/apoc-sidebar","owner":"nju33","description":"Sidebar without dependenceies","archived":false,"fork":false,"pushed_at":"2017-12-08T01:09:45.000Z","size":1115,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-22T15:46:59.434Z","etag":null,"topics":["pure-javascript","sidebar","ui"],"latest_commit_sha":null,"homepage":"https://nju33.github.io/apoc-sidebar/","language":"JavaScript","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/nju33.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-28T20:25:37.000Z","updated_at":"2023-12-28T19:14:09.000Z","dependencies_parsed_at":"2022-09-14T06:00:23.515Z","dependency_job_id":null,"html_url":"https://github.com/nju33/apoc-sidebar","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nju33%2Fapoc-sidebar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nju33%2Fapoc-sidebar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nju33%2Fapoc-sidebar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nju33%2Fapoc-sidebar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nju33","download_url":"https://codeload.github.com/nju33/apoc-sidebar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235204562,"owners_count":18952331,"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":["pure-javascript","sidebar","ui"],"created_at":"2024-11-22T12:13:23.445Z","updated_at":"2026-05-04T16:36:42.665Z","avatar_url":"https://github.com/nju33.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ApocSidebar\n\n[![npm: apoc-sidebar](https://img.shields.io/npm/v/apoc-sidebar.svg)](https://www.npmjs.com/package/apoc-sidebar)\n[![CircleCI: nju33/apoc-sidebar](https://circleci.com/gh/nju33/apoc-sidebar.svg?style=svg)](https://circleci.com/gh/nju33/apoc-sidebar)\n[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n![license: mit](https://img.shields.io/packagist/l/doctrine/orm.svg)\n\nSidebar without dependenceies\n\n![screenshot](https://github.com/nju33/apoc-sidebar/raw/master/images/screenshot.gif?raw=true)\n\n## Install or Download\n\n```bash\nyarn add apoc-sidebar\nnpm i apoc-sidebar\n```\n\nOr access to [releases page](https://github.com/nju33/apoc-sidebar/releases).\nThen, download the latest version.\n\n## Demo\n\n[https://nju33.github.io/apoc-sidebar/](https://nju33.github.io/apoc-sidebar/)\n\n## Usage\n\n```html\n\u003c!-- Elements that catch events --\u003e\n\u003cbutton id=\"trigger\"\u003e...\u003c/button\u003e\n\n\u003c!--\n  `data-apoc-sidebar-sibling` is required only when type is `lid`.\n  It must be a sibling of an element to become a sidebar.\n--\u003e\n\u003cdiv data-apoc-sidebar-sibling\u003e\u003c/div\u003e\n\n\u003c!--\n  Specify `width` in CSS.\n  Also, can hide the first state by adding `display:none` to the style\n--\u003e\n\u003cdiv id=\"sidebar\" style=\"width:300px;display:none\"\u003e...\u003c/div\u003e\n\n\u003c!-- When reading by itself --\u003e\n\u003cscript src=\"/path/tp/apoc-sidebar.js\"\u003e\u003c/script\u003e\n```\n\n```js\n// es\nimport ApocSidebar from 'apoc-sidebar';\n\nconst sidebar = new ApocSidebar(\n  document.getElementById('sidebar'),\n  {\n    // options\n\n    // default\n    type: 'slide',\n    // There are other types like this\n    // - 'water',\n    // - 'push',\n    // - 'lid',\n    // - 'door',\n    // - 'waterfall',\n    // - 'waterfallReverse'\n\n    // Parent surrounding `#sidebar` and `[data-apoc-sidebar-sibling]`\n    // default\n    container: sidebar.parentElement // the parentElement of the `#sidebar`\n\n\n    // Which side you put on\n    // default\n    side: 'left', // or 'right'\n\n    // The `transition-timing-function` value of css attached\n    // to all relevant elements\n    // default (easeInOutQuad)\n    // ref: http://easings.net/\n    transitionTimingFunction: 'cubic-bezier(0.455, 0.03, 0.515, 0.955)',\n\n    // The `transition-duration` value of css attached\n    // to all relevant elements\n    // default\n    transitionDuration: '.2s',\n\n    // Wall background color\n    // default\n    wallBackgroundColor: 'rgba(0,0,0,.3)'\n  }\n);\n\nsidebar.init();\n// You can also decide \"Open first or close\" like `sidebar.init(true)`.\n\n\ndocument.getElementById('trigger').addEventListener('click', () =\u003e {\n  if (sidebar.isOpen()) {\n    sidebar.close();\n  } else {\n    sidebar.open();\n  }\n});\n\nsetTimeout(() =\u003e {\n  // Delete events\n  sidebar.teardown();\n}, 999999)\n```\n\n### Examples\n\n- `test/fixtures/`\n- `example/webpack/`\n\n## LICENSE\n\nThe MIT License (MIT)\n\nCopyright (c) 2017 nju33 \u003cnju33.ki@gmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnju33%2Fapoc-sidebar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnju33%2Fapoc-sidebar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnju33%2Fapoc-sidebar/lists"}