{"id":23429874,"url":"https://github.com/mobilusoss/react-notification-badge","last_synced_at":"2025-03-17T16:12:03.074Z","repository":{"id":33666592,"uuid":"37319203","full_name":"mobilusoss/react-notification-badge","owner":"mobilusoss","description":"Simple notification badge react component","archived":false,"fork":false,"pushed_at":"2024-06-18T06:34:57.000Z","size":3704,"stargazers_count":48,"open_issues_count":19,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-07T13:03:13.878Z","etag":null,"topics":["badge","notification","react"],"latest_commit_sha":null,"homepage":"http://mobilusoss.github.io/react-notification-badge","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/mobilusoss.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-06-12T11:49:00.000Z","updated_at":"2024-06-29T15:03:31.000Z","dependencies_parsed_at":"2025-03-02T13:11:20.197Z","dependency_job_id":"7ef93b65-1cbe-4399-9134-123bd4e53968","html_url":"https://github.com/mobilusoss/react-notification-badge","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobilusoss%2Freact-notification-badge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobilusoss%2Freact-notification-badge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobilusoss%2Freact-notification-badge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobilusoss%2Freact-notification-badge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mobilusoss","download_url":"https://codeload.github.com/mobilusoss/react-notification-badge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244066189,"owners_count":20392406,"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":["badge","notification","react"],"created_at":"2024-12-23T08:13:28.523Z","updated_at":"2025-03-17T16:12:03.048Z","avatar_url":"https://github.com/mobilusoss.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-notification-badge [![Build Status](https://travis-ci.org/mobilusoss/react-notification-badge.svg?branch=develop)](https://travis-ci.org/mobilusoss/react-notification-badge) [![npm version](https://badge.fury.io/js/react-notification-badge.svg)](http://badge.fury.io/js/react-notification-badge) [![codebeat badge](https://codebeat.co/badges/85db9556-07c2-4119-a2d8-c1f5268d2554)](https://codebeat.co/projects/github-com-mobilusoss-react-notification-badge-master) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmobilusoss%2Freact-notification-badge.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmobilusoss%2Freact-notification-badge?ref=badge_shield) [![codecov](https://codecov.io/gh/mobilusoss/react-notification-badge/branch/master/graph/badge.svg)](https://codecov.io/gh/mobilusoss/react-notification-badge)\n\nSimple notification badge react component\n\n[![Gyazo](http://i.gyazo.com/70028f7eb324a89fb130401774e8a159.gif)](http://gyazo.com/70028f7eb324a89fb130401774e8a159)\n\n## Demo\n\n[View Demo](http://mobilusoss.github.io/react-notification-badge/example/)\n\n## Installation\n\n```bash\nnpm install --save react-notification-badge\n```\n\n## API\n\n### `NotificationBadge`\n\n#### Props\n\n```javascript\nNotificationBadge.propTypes = {\n  count: React.PropTypes.number,\n  label: React.PropTypes.string,\n  containerStyle: React.PropTypes.object,\n  style: React.PropTypes.object,\n  className: React.PropTypes.string,\n  effect: React.PropTypes.array,\n  duration: React.PropTypes.number\n};\n```\n\n  * `count`: Badge count, if `count \u003c 1`, badge will not shown.\n\n  * `label`: Badge label will be rendered instead of count.\n\n  * `containerStyle`: custom style of container\n\n  * `style`: custom style of badge\n\n  * `className`: className of badge\n\n  * `effect`: effect of notification.\n    effect array should be `[string, string, object, object]`.\n\n    `effect[0]` will be applied to `transform` on first frame.\n    `effect[1]` will be applied to `transform` on `frameLength`.\n    `effect[2]` will be applied as `style[key] = value` on first frame.\n    `effect[3]` will be applied to `style[key] = value` on `frameLength`.\n\n    Pre defined effect is available as\n      * `Effect.ROTATE_X`\n      * `Effect.ROTATE_Y`\n      * `Effect.SCALE`\n\n  * `frameLength`: Frame length for `effect[1]` and `effect[3]` (default 30.0, 60.0fps/30.0 = 0.5 second)\n\n## Usage example\n\n```javascript\n\nimport NotificationBadge from 'react-notification-badge';\nimport {Effect} from 'react-notification-badge';\n\n\u003cdiv style={container}\u003e\n  \u003cNotificationBadge count={this.state.count} effect={Effect.SCALE}/\u003e\n\u003c/div\u003e\n```\n\nSee  [example](https://github.com/mobilusoss/react-notification-badge/tree/develop/example)\n\n```bash\nnpm install\nnpm run start:example\n```\n\n## Tests\n\n```bash\nnpm test\n```\n\n## Update dependencies\n\nUse [npm-check-updates](https://www.npmjs.com/package/npm-check-updates)\n\n\n## License\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmobilusoss%2Freact-notification-badge.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmobilusoss%2Freact-notification-badge?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobilusoss%2Freact-notification-badge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmobilusoss%2Freact-notification-badge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobilusoss%2Freact-notification-badge/lists"}