{"id":19623832,"url":"https://github.com/appleple/pretty-scroll","last_synced_at":"2025-04-05T12:01:57.651Z","repository":{"id":54686623,"uuid":"114349421","full_name":"appleple/pretty-scroll","owner":"appleple","description":"A modern JS library to make an element follow you as you scroll","archived":false,"fork":false,"pushed_at":"2025-02-27T10:27:15.000Z","size":413,"stargazers_count":146,"open_issues_count":1,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T11:03:23.364Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://appleple.github.io/pretty-scroll/","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/appleple.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-12-15T08:57:48.000Z","updated_at":"2025-02-27T10:27:18.000Z","dependencies_parsed_at":"2022-08-14T00:00:50.664Z","dependency_job_id":null,"html_url":"https://github.com/appleple/pretty-scroll","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleple%2Fpretty-scroll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleple%2Fpretty-scroll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleple%2Fpretty-scroll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleple%2Fpretty-scroll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appleple","download_url":"https://codeload.github.com/appleple/pretty-scroll/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332556,"owners_count":20921853,"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":"2024-11-11T11:35:40.427Z","updated_at":"2025-04-05T12:01:57.628Z","avatar_url":"https://github.com/appleple.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pretty Scroll\nA library to make an element follow you as you scroll\n\n## Demos\n\n- [https://codepen.io/appleple/pen/LeZWjm](https://codepen.io/appleple/pen/LeZWjm)\n- [https://codepen.io/appleple/pen/jYrBKr](https://codepen.io/appleple/pen/jYrBKr)\n\n## Installation\n- [npm](https://www.npmjs.com/package/pretty-scroll)\n- [standalone](https://raw.githubusercontent.com/appleple/pretty-scroll/master/js/pretty-scroll.js)\n\nvia npm\n```shell\nnpm install pretty-scroll --save\n```\n\nor yarn\n\n```shell\nyarn add pretty-scroll\n```\n\n### Basic\n\n```html\n\u003cdiv class=\"js-container\"\u003e\n  \u003cdiv class=\"main\"\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"sub\"\u003e\n    \u003cdiv class=\"js-sidebar\"\u003e\n      \u003c!-- contents here --\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n```js\nnew PrettyScroll('.js-sidebar', {\n  container: '.js-container',\n  breakpoint: 575, // stop running the js when the window size is smaller than 575px\n  offsetTop: 20, // space between the sticky element and the top of the window\n  offsetBottom: 20, // space between the sticky element and the bottom of the window\n  condition: () =\u003e true // you can disable the sticky behavior by returning false, it will be executed when you scroll.\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappleple%2Fpretty-scroll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappleple%2Fpretty-scroll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappleple%2Fpretty-scroll/lists"}