{"id":51431530,"url":"https://github.com/code-hemu/stickygum","last_synced_at":"2026-07-05T04:03:22.169Z","repository":{"id":367814819,"uuid":"1281522940","full_name":"code-hemu/stickygum","owner":"code-hemu","description":"sticky sidebar library with smooth scrolling and responsive support.","archived":false,"fork":false,"pushed_at":"2026-06-27T19:10:28.000Z","size":267,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-27T20:22:14.306Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code-hemu.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-26T16:35:52.000Z","updated_at":"2026-06-27T19:10:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/code-hemu/stickygum","commit_stats":null,"previous_names":["code-hemu/stickygum"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/code-hemu/stickygum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-hemu%2Fstickygum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-hemu%2Fstickygum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-hemu%2Fstickygum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-hemu%2Fstickygum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-hemu","download_url":"https://codeload.github.com/code-hemu/stickygum/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-hemu%2Fstickygum/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35142824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-07-05T04:03:21.538Z","updated_at":"2026-07-05T04:03:22.152Z","avatar_url":"https://github.com/code-hemu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/code-hemu/stickygum\"\u003e\n    \u003cpicture\u003e\n      \u003cimg src=\"https://raw.githubusercontent.com/code-hemu/stickygum/refs/heads/main/resources/logo.png\" alt=\"stickygum logo\" width=\"312px\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/stickygum\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/stickygum\" alt=\"Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/code-hemu/stickygum/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/code-hemu/stickygum\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.jsdelivr.com/package/npm/stickygum\"\u003e\u003cimg src=\"https://data.jsdelivr.com/v1/package/npm/stickygum/badge?style=rounded\" alt=\"jsDelivr\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/code-hemu/stickygum/graphs/contributors\"\u003e\u003cimg src=\"https://img.shields.io/github/contributors/code-hemu/stickygum\" alt=\"jsDelivr\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nStickyGum is a JavaScript library for creating sticky sidebars. It keeps sidebars visible while scrolling, ensures they stay within their parent container, and automatically adapts to responsive layouts. Support for multiple sticky modes and smooth positioning, StickyGum works out of the box in modern browsers.\n\n\n# Installation\n\nInstall StickyGum from npm:\n\n```bash\nnpm install stickygum\n```\n\n# Getting Started\n\nStickyGum supports Browser, ES Modules, and CommonJS.\n\n## Browser (CDN)\n\n```html\n\u003cscript src=\"stickygum.min.js\"\u003e\u003c/script\u003e\n\n\u003cscript\u003e\nnew StickyGum({\n  container: \"#main-wrapper\",\n  sidebar: \"#sidebar-wrapper\",\n  offsetTop: 30,\n  offsetBottom: 30\n});\n\u003c/script\u003e\n```\n\n## ES Modules\n\n```javascript\nimport StickyGum from \"stickygum\";\n\nnew StickyGum({\n  container: \"#main-wrapper\",\n  sidebar: \"#sidebar-wrapper\"\n});\n```\n\n## CommonJS\n\n```javascript\nconst StickyGum = require(\"stickygum\");\n\nnew StickyGum({\n  container: \"#main-wrapper\",\n  sidebar: \"#sidebar-wrapper\"\n});\n```\n\n# HTML Structure\n\nYour sidebar should be placed inside the container that defines its scrolling boundary.\n\n```html\n\u003cmain id=\"main-wrapper\"\u003e\n  \u003carticle\u003e\n    Main content\n  \u003c/article\u003e\n\n  \u003caside id=\"sidebar-wrapper\"\u003e\n    Sidebar content\n  \u003c/aside\u003e\n\u003c/main\u003e\n```\n\nOnce the container reaches its bottom edge, StickyGum stops the sidebar there instead of allowing it to scroll beyond the container.\n\n\n# Options\n\nAll configuration is passed through the constructor.\n\n| Option                       | Type                                              | Default        | Description                                                             |\n| ---------------------------- | ------------------------------------------------- | -------------- | ----------------------------------------------------------------------- |\n| `container`                  | `string \\| HTMLElement`                           | Sidebar parent | Container that limits the sticky area.                                  |\n| `sidebar`                    | `string \\| HTMLElement \\| HTMLElement[]`          | -              | Sidebar element(s) to make sticky.                                      |\n| `offsetTop`                  | `number`                                          | `0`            | Space between the top of the viewport and the sidebar.                  |\n| `offsetBottom`               | `number`                                          | `0`            | Space between the bottom of the viewport and the sidebar.               |\n| `updateSidebarHeight`        | `boolean`                                         | `true`         | Updates sidebar height dynamically while scrolling.                     |\n| `minWidth`                   | `number`                                          | `0`            | Disables StickyGum below this viewport width.                           |\n| `disableOnResponsiveLayouts` | `boolean`                                         | `true`         | Automatically disables sticky behavior when the layout becomes stacked. |\n| `sidebarBehavior`            | `\"modern\" \\| \"stick-to-top\" \\| \"stick-to-bottom\"` | `\"modern\"`     | Controls how the sidebar behaves while scrolling.                       |\n| `defaultPosition`            | `string`                                          | `\"relative\"`   | Initial CSS position before StickyGum starts.                           |\n| `verbose`                    | `boolean`                                         | `false`        | Logs helpful warnings during initialization.                            |\n\n\n# Destroying an Instance\n\nCall `unbind()` to remove all event listeners and restore the sidebar to its original state.\n\n```javascript\nconst sticky = new StickyGum({\n  container: \"#main-wrapper\",\n  sidebar: \"#sidebar-wrapper\"\n});\n\nsticky.unbind();\n```\n\nThis is especially useful when unmounting components in single-page applications.\n\n\n# Package Entry Points\n\nStickyGum provides separate builds for different environments.\n\n```json\n{\n  \"main\": \"dist/stickygum.cjs\",\n  \"module\": \"dist/stickygum.esm.js\",\n  \"browser\": \"dist/stickygum.min.js\",\n  \"exports\": {\n    \".\": {\n      \"import\": \"./dist/stickygum.esm.js\",\n      \"require\": \"./dist/stickygum.cjs\"\n    }\n  }\n}\n```\n\n* **CommonJS** - `dist/stickygum.cjs`\n* **ES Modules** - `dist/stickygum.esm.js`\n* **Browser (IIFE)** - `dist/stickygum.min.js`\n\nThe browser build exposes a global `StickyGum` object, while bundlers automatically resolve the appropriate module through the `exports` field.\n\n\n## License\n\nStickyGum is licensed under **GPL-3.0**. Copyright © [Hemanta Gayen](https://github.com/hemanta-gayen).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-hemu%2Fstickygum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-hemu%2Fstickygum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-hemu%2Fstickygum/lists"}