{"id":14990833,"url":"https://github.com/kenmaca/react-native-tear-lines","last_synced_at":"2025-04-12T03:24:42.771Z","repository":{"id":57340678,"uuid":"122935109","full_name":"kenmaca/react-native-tear-lines","owner":"kenmaca","description":"Zig-zag borders to simulate tear lines normally seen on receipts.","archived":false,"fork":false,"pushed_at":"2023-03-03T05:10:54.000Z","size":160,"stargazers_count":32,"open_issues_count":4,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-29T09:22:19.592Z","etag":null,"topics":["component","ios","react-native"],"latest_commit_sha":null,"homepage":null,"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/kenmaca.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}},"created_at":"2018-02-26T08:06:10.000Z","updated_at":"2024-06-18T22:47:59.452Z","dependencies_parsed_at":"2024-06-18T22:47:51.643Z","dependency_job_id":"d9e170df-ecdf-468a-addc-16495fe4b627","html_url":"https://github.com/kenmaca/react-native-tear-lines","commit_stats":{"total_commits":14,"total_committers":5,"mean_commits":2.8,"dds":0.2857142857142857,"last_synced_commit":"8636915fbe7f4acca847cdc9b8ee10406afb840e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenmaca%2Freact-native-tear-lines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenmaca%2Freact-native-tear-lines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenmaca%2Freact-native-tear-lines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenmaca%2Freact-native-tear-lines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kenmaca","download_url":"https://codeload.github.com/kenmaca/react-native-tear-lines/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248511095,"owners_count":21116352,"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":["component","ios","react-native"],"created_at":"2024-09-24T14:20:56.264Z","updated_at":"2025-04-12T03:24:42.752Z","avatar_url":"https://github.com/kenmaca.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-tear-lines\nZig-zag borders to simulate tear lines normally seen on receipts.\n\n\u003cIMG SRC=\"https://raw.githubusercontent.com/kenmaca/react-native-tear-lines/master/demo.png\" width=\"400\" /\u003e\n\n## Installation\n\n```\nyarn add react-native-tear-lines\n```\n\n## Usage\n\nUse `TearLines`'s `onLayout` method in the attached component's `onLayout` prop\nto dynamically match its width as demonstrated below:\n\n```js\nimport { View } from \"react-native\";\nimport TearLines from \"react-native-tear-lines\";\n\n\u003cView style={{ backgroundColor: \"#CCCCCC\" }}\u003e\n  \u003cTearLines\n    ref=\"top\"\n    color=\"#FFFFFF\"\n    backgroundColor=\"#CCCCCC\"\u003e\n  \u003cView\n    style={{ backgroundColor: \"#FFFFFF\" }}\n    onLayout={e =\u003e {\n      this.refs.top.onLayout(e);\n      this.refs.bottom.onLayout(e);\n    }} /\u003e\n  \u003cTearLines\n    isUnder\n    ref=\"bottom\"\n    color=\"#FFFFFF\"\n    backgroundColor=\"#CCCCCC\"\u003e\n\u003c/View\u003e\n```\n\n## Properties\n\n| Prop | Description | Default | Required |\n|---|---|---|---|\n|**`isUnder`**|`true` if this `TearLines` is used at the bottom of the attached view rather than the top.|`false`|No|\n|**`color`**|Foreground color; should match attached content view's background color.|`#FFFFFF`|No|\n|**`backgroundColor`**|Background color, should match container's background color.|`#CCCCCC`|No|\n|**`tearSize`**|Specifies how large each tear tile is. Larger values will render less tiles.|`10`|No|\n|**`width`**|Width can be provided if you don't want to use the `onLayout` method to dynamically match the attached content view.|*None*|No|\n\n## License\n\n[MIT License](http://opensource.org/licenses/mit-license.html). © Kenneth Ma\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenmaca%2Freact-native-tear-lines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenmaca%2Freact-native-tear-lines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenmaca%2Freact-native-tear-lines/lists"}