{"id":13660771,"url":"https://github.com/lentschi/ngx-ellipsis","last_synced_at":"2026-04-04T12:58:09.051Z","repository":{"id":24951370,"uuid":"102845697","full_name":"lentschi/ngx-ellipsis","owner":"lentschi","description":"Multiline text with ellipsis for angular 9+","archived":false,"fork":false,"pushed_at":"2025-12-26T17:20:42.000Z","size":1748,"stargazers_count":97,"open_issues_count":6,"forks_count":22,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-03-16T08:52:03.657Z","etag":null,"topics":["angular","multiline-ellipsis"],"latest_commit_sha":null,"homepage":"","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/lentschi.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":"2017-09-08T09:42:31.000Z","updated_at":"2026-02-17T23:04:00.000Z","dependencies_parsed_at":"2024-01-15T20:50:55.176Z","dependency_job_id":"574c2aa8-aa93-4e17-b84d-2dcea765ae70","html_url":"https://github.com/lentschi/ngx-ellipsis","commit_stats":{"total_commits":143,"total_committers":5,"mean_commits":28.6,"dds":0.06293706293706292,"last_synced_commit":"7552f3cac15ee8015cfd70ed19bc3c1f4bdd8f40"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/lentschi/ngx-ellipsis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lentschi%2Fngx-ellipsis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lentschi%2Fngx-ellipsis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lentschi%2Fngx-ellipsis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lentschi%2Fngx-ellipsis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lentschi","download_url":"https://codeload.github.com/lentschi/ngx-ellipsis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lentschi%2Fngx-ellipsis/sbom","scorecard":{"id":584369,"data":{"date":"2025-08-11","repo":{"name":"github.com/lentschi/ngx-ellipsis","commit":"f2c9444cfcd6d55f6954906e7ebb6cc90aa0dc8a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":2,"reason":"2 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"25 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-c75v-2vq8-878f","Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-64vr-g452-qvp3","Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx","Warn: Project is vulnerable to: GHSA-vg6x-rcgg-rjx6","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T20:02:27.686Z","repository_id":24951370,"created_at":"2025-08-20T20:02:27.686Z","updated_at":"2025-08-20T20:02:27.686Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31400460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["angular","multiline-ellipsis"],"created_at":"2024-08-02T05:01:25.568Z","updated_at":"2026-04-04T12:58:09.028Z","avatar_url":"https://github.com/lentschi.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Recently Updated","Third Party Components"],"sub_categories":["[Sep 04, 2024](/content/2024/09/04/README.md)","DOM"],"readme":"# ngx-ellipsis\n\nAngular library providing a directive to display an ellipsis if the containing text would overflow.\n\nSupports text only - __No HTML contents!__ (If you really do need html contents to be truncated, you might want to take a look at my spin-off lib: [ngx-nested-ellipsis](https://github.com/lentschi/ngx-nested-ellipsis). It is able to do just that, but takes slightly more processing power to perform its task.)\n\n## Demo\n\nFor a demo either just checkout this project and run `npm install \u0026\u0026 npm run start` or visit [the StackBlitz demo page](https://stackblitz.com/github/lentschi/ngx-ellipsis?file=src%2Fapp%2Fapp.component.html).\n\n## Installation\n\nFor use in an existing angular project run `npm install ngx-ellipsis --save`.\n\n\n## Usage\n\nAdd the directive to the component, in which you want to use the ellipsis:\n\n```typescript\nimport { EllipsisDirective } from 'ngx-ellipsis';\n\n@Component({\n  selector: 'your-fancy-component',\n  // ...\n  imports: [ \n    EllipsisDirective,\n    // ...\n  ],\n  standalone: true\n})\nexport class YourFancyComponent {}\n\n```\n\n\n\nThen anywhere in this component's template:\n\n```html\n\u003cdiv style=\"width: 100px; height: 100px;\" ellipsis\u003eYour very long text\u003c/div\u003e\n\n\u003c!-- Or for dynamic content: --\u003e\n\u003cdiv style=\"width: 100px; height: 100px;\" ellipsis [ellipsis-content]=\"yourDynamicContent\"\u003e\u003c/div\u003e\n```\n\nAs you can see, you need to define the dimensions of your element yourself. (ngx-ellipsis doesn't automatically add any element styles.) But of course you don't need to use fixed widths/heights like in these examples. Flex layout shold work just fine for example.\n\n### Module import\n\nShould you not be using [angular standalone components](https://blog.angular-university.io/angular-standalone-components/) in your project (available since angular 16), import `EllipsisModule` in your module instead - see [old instructions](https://github.com/lentschi/ngx-ellipsis/blob/v4.1.4/README.md#installation) for an example.\n\n### Extra options\n\nYou may add the following attributes to change the directive's behavior:\n\n| attribute | meaning |\n| ---- | ---- |\n| __ellipsis__ | _required_ If you pass an attribute value (e.g. `ellipsis=\" More ...\"`) you can override the text that will be appended, should it be necessary to truncate the text (_default_: \"...\")|\n| __ellipsis-content__ | Use this for dynamic content, that will be subject to asynchronous changes (e.g.: `[ellipsis-content]=\"myVar\"`) |\n| __ellipsis-word-boundaries__ | If you pass this attribute, the text won't be truncated at just any character but only at those in the attribute's value. For example `ellipsis-word-boundaries=\" \\n\"` will allow the text to break at spaces and newlines only |\n| __ellipsis-substr-fn__ | `substr` function to use for string splitting. Defaults to the native `String#substr`. (This may for example be used to avoid splitting [surrogate pairs](http://en.wikipedia.org/wiki/UTF-16) - used by some emojis - by providing a lib such as [runes](https://github.com/dotcypress/runes).) |\n| __ellipsis-resize-detection__ | How resize events should be detected - these are the possible values: \u003cul\u003e\u003cli\u003e__resize-observer__: _default_ Use native ResizeObserver - see https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver\u003c/li\u003e\u003cli\u003e__window__: Only listen if the whole window has been resized/changed orientation (Possibly better performance, but obviously won't trigger on resize caused directly or indirectly by javascript.)\u003c/li\u003e\u003cli\u003e__manual__: Ellipsis is never applied automatically. Instead the consuming app may use `#ell=\"ellipsis\"` in the template and `this.ell.applyEllipsis()` in the component code.\u003c/li\u003e\u003c/ul\u003e |\n| __ellipsis-click-more__ | Event emitter - If set, the text defined by the `ellipsis`  attribute will be converted into a clickable link. For example `(ellipsis-click-more)=\"moreClicked()\"` will call your component's `moreClicked()` method when the user clicks on the link.|\n| __ellipsis-change__ | Event emitter - Will be emitted whenever the ellipsis has been recalculated (depending on `ellipsis-resize-detection`). If the text had to be truncated the position of the last visible character will be emitted, else `null`.|\n\n## Build \u0026 publish on npm\n\nIn case you want to contribute/fork:\n\n1. Run `npm install`\n1. Adept version and author in `./projects/ngx-ellipsis/package.json` and `./README.md` and commit the changes to your fork.\n1. Run `npm run build-lib` which outputs the build to `./dist/ngx-ellipsis`.\n1. To publish your build, run `npm run publish-lib`.\n\n\n## Running unit tests\n\nRun `npm run test ngx-ellipsis` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flentschi%2Fngx-ellipsis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flentschi%2Fngx-ellipsis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flentschi%2Fngx-ellipsis/lists"}