{"id":13630635,"url":"https://github.com/microlinkhq/nanoclamp","last_synced_at":"2025-04-05T17:07:59.945Z","repository":{"id":29664776,"uuid":"122525273","full_name":"microlinkhq/nanoclamp","owner":"microlinkhq","description":"🗜Responsive clamping component for React in 735 bytes.","archived":false,"fork":false,"pushed_at":"2025-03-24T11:55:19.000Z","size":769,"stargazers_count":44,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T12:41:53.253Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://nanoclamp.microlink.io","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/microlinkhq.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-22T19:32:25.000Z","updated_at":"2025-03-24T11:55:22.000Z","dependencies_parsed_at":"2023-01-14T15:25:01.956Z","dependency_job_id":"a116c9ac-ef41-4394-aa6f-2093d2edfeb0","html_url":"https://github.com/microlinkhq/nanoclamp","commit_stats":{"total_commits":164,"total_committers":8,"mean_commits":20.5,"dds":0.4878048780487805,"last_synced_commit":"5aa8d54da102f45076f8d7b046fe8eb8c77b64b0"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microlinkhq%2Fnanoclamp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microlinkhq%2Fnanoclamp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microlinkhq%2Fnanoclamp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microlinkhq%2Fnanoclamp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microlinkhq","download_url":"https://codeload.github.com/microlinkhq/nanoclamp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369952,"owners_count":20927928,"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-08-01T22:01:51.578Z","updated_at":"2025-04-05T17:07:59.914Z","avatar_url":"https://github.com/microlinkhq.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/microlinkhq/cdn/raw/master/dist/logo/banner.png#gh-light-mode-only\" alt=\"microlink logo\"\u003e\n  \u003cimg src=\"https://github.com/microlinkhq/cdn/raw/master/dist/logo/banner-dark.png#gh-dark-mode-only\" alt=\"microlink logo\"\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/div\u003e\n\n[![Last version](https://img.shields.io/github/tag/microlinkhq/nanoclamp.svg?style=flat-square)](https://github.com/microlinkhq/nanoclamp/releases)\n[![NPM Status](https://img.shields.io/npm/dm/nanoclamp.svg?style=flat-square)](https://www.npmjs.org/package/nanoclamp)\n\n###### [Storybook](https://nanoclamp.netlify.com/)\n\n\u003e Responsive text clamping component. Inspired by [react-clamp-lines](https://github.com/zoltantothcom/react-clamp-lines), but smaller (~1KB).\n\n## Install\n\n```\nnpm install nanoclamp --save\n```\n\n## Usage\n\n```jsx\nimport NanoClamp from 'nanoclamp';\n\n\u003cNanoClamp\n  className=\"custom-class\"\n  is=\"p\"\n  lines={2}\n  text={'Some text to clamp.'}\n/\u003e\n```\n\n## API\n\n| prop          | type      | default | description                                                             |\n|---------------|-----------|---------|-------------------------------------------------------------------------|\n| accessibility | `boolean` | `true`  | Pass the full _unclamped_ string to the DOM element's `title` attribute |\n| className     | `string`  |         | CSS classname(s) added to the string                                    |\n| debounce      | `number`  | `300`   | Time in milliseconds used for debounce                                  |\n| ellipsis      | `string`  | `'…'`   | String displayed after the clamped `text`                               |\n| is            | `string`  | `'div'` | DOM selector used to render the string                                  |\n| lines         | `number`  | `3`     | Number of visible lines                                                 |\n| text          | `string`  |         | Text you wish to clamp                                                  |\n\n## License\n\n**nanoclamp** © [Microlink](https://microlink.io), released under the [MIT](https://github.com/microlinkhq/nanoclamp/blob/master/LICENSE.md) License.\u003cbr\u003e\nAdapted from [`react-clamp-lines`](https://github.com/zoltantothcom/react-clamp-lines) by Brad Adams with help from [contributors](https://github.com/microlinkhq/nanoclamp/contributors).\n\n\u003e [microlink.io](https://microlink.io) · GitHub [microlinkhq](https://github.com/microlinkhq) · X [@microlinkhq](https://x.com/microlinkhq)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrolinkhq%2Fnanoclamp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrolinkhq%2Fnanoclamp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrolinkhq%2Fnanoclamp/lists"}