{"id":16009751,"url":"https://github.com/hirohe/react-watermark","last_synced_at":"2025-03-17T16:30:28.750Z","repository":{"id":57116041,"uuid":"314278231","full_name":"hirohe/react-watermark","owner":"hirohe","description":"A React Component to wrap watermark text on child component, using generated svg as background-image","archived":false,"fork":false,"pushed_at":"2023-01-11T11:56:32.000Z","size":465,"stargazers_count":15,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T03:37:36.897Z","etag":null,"topics":["component","react","reactcompoenets","watermark"],"latest_commit_sha":null,"homepage":"https://hirohe.github.io/react-watermark/?path=/docs/watermark-test--default","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/hirohe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-19T14:47:39.000Z","updated_at":"2024-12-06T14:10:29.000Z","dependencies_parsed_at":"2023-02-09T03:01:12.427Z","dependency_job_id":null,"html_url":"https://github.com/hirohe/react-watermark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirohe%2Freact-watermark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirohe%2Freact-watermark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirohe%2Freact-watermark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirohe%2Freact-watermark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hirohe","download_url":"https://codeload.github.com/hirohe/react-watermark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243680952,"owners_count":20330153,"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","react","reactcompoenets","watermark"],"created_at":"2024-10-08T13:04:03.918Z","updated_at":"2025-03-17T16:30:28.302Z","avatar_url":"https://github.com/hirohe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Watermark Component\n\n![version](https://badge.fury.io/js/%40hirohe%2Freact-watermark.svg)\n\n\nA React Component to wrap watermark text on child component, using generated svg as background-image\n\n## Doc\n[Storybook](https://hirohe.github.io/react-watermark/?path=/docs/watermark-test--default)\n\n## Usage:\n\n\u003e this Component requires react version \u003e=16.8.0, in order to use the react hook feature\n\n```bash\nyarn add @hirohe/react-watermark\n# or\nnpm i --save @hirohe/react-watermark\n```\n\ne.g.\n\n```jsx\nimport { Watermark } from '@hirohe/react-watermark';\n\nconst ContentWithWatermark = () =\u003e (\n  \u003cWatermark text=\"Mark\"\u003e\n    \u003cdiv style={{ width: 500, height: 500, backgroundColor: '#5f5f5f' }}\u003e\n      Lorem ipsum\n    \u003c/div\u003e\n  \u003c/Watermark\u003e\n)\n```\n\n![example](https://github.com/hirohe/react-watermark/raw/master/doc/example.png)\n\n\n## Props\n\n| prop           | description                      | type              | default                      |\n|----------------|----------------------------------|-------------------|------------------------------|\n| show           | show watermark or not            | boolean           | true                         |\n| text           | watermark text                   | string            | -                            |\n| textColor      | color of watermark               | color string      | #cccccc                      |\n| textSize       | watermark text size in px unit   | number            | 24                           |\n| fontFamily     | watermark text font-family       | string            | Arial, Helvetica, sans-serif |\n| lineHeight     | watermark text lineHeight        | string            | '1.2rem'                     |\n| multiline      | whether text is multiline or not | boolean           | false                        |\n| opacity        | watermark text opacity           | number            | 0.2                          |\n| rotate         | watermark text rotate degree     | number            | -45                          |\n| gutter         | gutter between watermark text    | number            | 0                            |\n| wrapperStyle   | style of wrapper                 | CSSProperties     | -                            |\n| wrapperElement | element of wrapper               | React.ElementType | 'div'                        |\n\n\n## TODO\n\n- [x] multiline watermark text\n- [x] adjustable space between watermark\n\n\n## License\nMIT License. See `LICENSE.txt` for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirohe%2Freact-watermark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhirohe%2Freact-watermark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirohe%2Freact-watermark/lists"}