{"id":19044551,"url":"https://github.com/brakmic/ngx-perfect-scrollbar-portable","last_synced_at":"2025-04-23T23:29:23.329Z","repository":{"id":196986276,"uuid":"697800407","full_name":"brakmic/ngx-perfect-scrollbar-portable","owner":"brakmic","description":"Angular wrapper library for the Perfect Scrollbar","archived":false,"fork":false,"pushed_at":"2024-12-02T08:59:59.000Z","size":4391,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T09:11:11.407Z","etag":null,"topics":["angular","perfect-scrollbar","ui"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ngx-perfect-scrollbar-portable","language":"TypeScript","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/brakmic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-28T13:57:56.000Z","updated_at":"2024-12-02T08:55:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"5a0e62af-7a32-46f4-ae89-738c3631f06e","html_url":"https://github.com/brakmic/ngx-perfect-scrollbar-portable","commit_stats":null,"previous_names":["brakmic/ngx-perfect-scrollbar-portable"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2Fngx-perfect-scrollbar-portable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2Fngx-perfect-scrollbar-portable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2Fngx-perfect-scrollbar-portable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2Fngx-perfect-scrollbar-portable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brakmic","download_url":"https://codeload.github.com/brakmic/ngx-perfect-scrollbar-portable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249369207,"owners_count":21258977,"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":["angular","perfect-scrollbar","ui"],"created_at":"2024-11-08T22:46:36.849Z","updated_at":"2025-04-17T19:31:31.708Z","avatar_url":"https://github.com/brakmic.png","language":"TypeScript","funding_links":[],"categories":["Third Party Components"],"sub_categories":["Scroll"],"readme":"# Angular Perfect Scrollbar Portable\n\nThis is an Angular wrapper library for the **Perfect Scrollbar**.\n \n![showcase](./showcase.gif)\n\n### Fork Notice\n\nThis fork was created due to the discontinuation of development on the original library from the repository [zefoy/ngx-perfect-scrollbar](https://github.com/zefoy/ngx-perfect-scrollbar). The original library hasn't been maintained for a while and exhibited incompatibilities with Angular versions 17-19. This fork addresses those issues and makes the library compatible with Angular version 19.\n\n### Prerequisites\n\nFor utilizing this library, it's essential to have at least Node 18.19.1 installed on your machine. Additionally, while NPM can be used, [PNPM](https://pnpm.io/) is preferred due to its efficient handling of node modules.\n\n\n### Building the library\n\n```bash\npnpm install\npnpm build\n```\n\n### Installing and usage\n\n```bash\npnpm install ngx-perfect-scrollbar-portable --save\n```\n\n##### Load the module for your app (with global configuration):\n\nProviding the global configuration is optional and when used you should only provide the configuration in your root module.\n\n```javascript\nimport { PerfectScrollbarModule } from 'ngx-perfect-scrollbar-portable';\nimport { PERFECT_SCROLLBAR_CONFIG } from 'ngx-perfect-scrollbar-portable';\nimport { PerfectScrollbarConfigInterface } from 'ngx-perfect-scrollbar-portable';\n\nconst DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {\n  suppressScrollX: true\n};\n\n@NgModule({\n  ...\n  imports: [\n    ...\n    PerfectScrollbarModule\n  ],\n  providers: [\n    {\n      provide: PERFECT_SCROLLBAR_CONFIG,\n      useValue: DEFAULT_PERFECT_SCROLLBAR_CONFIG\n    }\n  ]\n})\n```\n\n##### Use it in your HTML template (with custom configuration):\n\nThis library provides two ways to create a Perfect Scrollbar element, a component and a directive. Component tries to make the usage as simple as possible and the directive is meant for more custom / advanced use cases.\n\nThe scroll area always needs some fixed height to work. The default styles uses 100% as the height value so the parent needs to have fixed height or you need to set it via CSS styles. Otherwise the height keeps growing and you won't get the scrollbars.\n\n**COMPONENT USAGE**\n\nSimply replace the element that would ordinarily be passed to `PerfectScrollbar` with the perfect-scollbar component.\n\n```html\n\u003cperfect-scrollbar style=\"max-width: 600px; max-height: 400px;\" [config]=\"config\"\u003e\n  \u003cdiv\u003eScrollable content\u003c/div\u003e\n\u003c/perfect-scrollbar\u003e\n```\n\n```javascript\n[config]                // Custom config to override the global defaults.\n[disabled]              // Disables the Perfect Scrollbar initialization.\n\n[usePSClass]            // Use 'ps' class (needed by the ps theme styles).\n\n[autoPropagation]       // Automatic swipe and wheel propagation control.\n[scrollIndicators]      // Enable fading edges scroll indicators showing.\n\n(\u003cpsEventName\u003e)         // All Perfect Scrollbar events work as bindings.\n                        // Event names are in camel case (not kebab case).\n                        // Example: ps-y-reach-start -\u003e psYReachStart\n```\n\n**DIRECTIVE USAGE**\n\nWhen using only the directive you need to provide your own theming or import the default theme:\n\n```css\n@import '~perfect-scrollbar/css/perfect-scrollbar.css';\n```\n\nPerfect Scrollbar directive should be used with div elements and can take optional custom configuration:\n\n```html\n\u003cdiv class=\"ps\" style=\"position: relative; max-width: 600px; max-height: 400px;\" [perfectScrollbar]=\"config\"\u003e\n  \u003cdiv\u003eScrollable content\u003c/div\u003e\n\u003c/div\u003e\n```\n\n```javascript\n[perfectScrollbar]      // Can be used to provide optional custom config.\n\n[disabled]              // Disables the Perfect Scrollbar initialization.\n\n(\u003cpsEventName\u003e)         // All Perfect Scrollbar events work as bindings.\n                        // Event namea are in camel case (not kebab case).\n                        // Example: ps-y-reach-start -\u003e psYReachStart\n```\n\n##### Available configuration options (custom / global configuration):\n\n```javascript\nhandlers                // List of event handlers to scroll the element.\nwheelSpeed              // Scroll speed for the mousewheel event (Default: 1).\nswipeEasing             // Use easing for the swipe scrolling (Default: true).\nsuppressScrollX         // Disable X axis in all situations (Default: false).\nsuppressScrollY         // Disable Y axis in all situations (Default: false).\nwheelPropagation        // Propagate wheel events at the end (Default: false).\nuseBothWheelAxes        // Always use both of the wheel axes (Default: false).\nminScrollbarLength      // Minimum size (px) for the scrollbar (Default: null).\nmaxScrollbarLength      // Maximum size (px) for the scrollbar (Default: null).\nscrollXMarginOffset     // Offset before enabling the X scroller (Default: 0).\nscrollYMarginOffset     // Offset before enabling the Y scroller (Default: 0).\n```\n\nFor more detailed documentation with all the supported events / options see the the Perfect Scrollbar documentation.\n\n##### Available control / helper functions (provided by the directive):\n\n```javascript\nps()                                        // Returns reference to the PS instance.\n\nupdate()                                    // Updates the scrollbar size and position.\n\ngeometry(prefix)                            // Returns the geometry with specified prefix.\nposition(absolute)                          // Returns the reach or absolute scroll position.\n\nscrollable(direction)                       // Checks if the given direction is scrollable.\n                                            // Direction can be: 'any', 'both', 'x', 'y'\n\nscrollTo(x, y, speed?)                      // Animate scroll to given x,y coordinates.\nscrollToY(position, speed?)                 // Animate scroll to given vertical position.\nscrollToX(position, speed?)                 // Animate scroll to given horizontal position.\nscrollToTop(offset?, speed?)                // Animate scroll to given offset from the top.\nscrollToLeft(offset?, speed?)               // Animate scroll to given offset from the left.\nscrollToRight(offset?, speed?)              // Animate scroll to given offset from the right.\nscrollToBottom(offset?, speed?)             // Animate scroll to given offset from the bottom.\nscrollToElement(element, offset?, speed?)   // Animate scroll to given or matching HTML element.\n                                            // Input can be HTMLElement or a query selector string.\n```\n\nAbove functions can be accessed through the directive reference (available as directiveRef in the component). Position and offset needs to be given in pixels and speed in milliseconds.\n\n\n## LICENSE\n[MIT](./LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrakmic%2Fngx-perfect-scrollbar-portable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrakmic%2Fngx-perfect-scrollbar-portable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrakmic%2Fngx-perfect-scrollbar-portable/lists"}