{"id":13436856,"url":"https://github.com/banyan/react-emoji","last_synced_at":"2025-07-22T09:09:15.827Z","repository":{"id":29184269,"uuid":"32715180","full_name":"banyan/react-emoji","owner":"banyan","description":"An emoji mixin for React","archived":false,"fork":false,"pushed_at":"2017-06-08T10:24:02.000Z","size":866,"stargazers_count":197,"open_issues_count":13,"forks_count":39,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-26T01:10:00.217Z","etag":null,"topics":[],"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/banyan.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}},"created_at":"2015-03-23T06:38:23.000Z","updated_at":"2024-06-17T13:17:27.000Z","dependencies_parsed_at":"2022-08-17T19:40:25.426Z","dependency_job_id":null,"html_url":"https://github.com/banyan/react-emoji","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/banyan/react-emoji","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banyan%2Freact-emoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banyan%2Freact-emoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banyan%2Freact-emoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banyan%2Freact-emoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/banyan","download_url":"https://codeload.github.com/banyan/react-emoji/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banyan%2Freact-emoji/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266463050,"owners_count":23932895,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-07-31T03:00:52.597Z","updated_at":"2025-07-22T09:09:15.803Z","avatar_url":"https://github.com/banyan.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized","UI Components","Demos","\u003csummary\u003eUI Components\u003c/summary\u003e","JavaScript"],"sub_categories":["Uncategorized","Icons"],"readme":"# react-emoji\n\n[![Circle CI](https://img.shields.io/circleci/project/banyan/react-emoji.svg?style=flat-square)](https://circleci.com/gh/banyan/react-emoji)\n[![NPM](https://img.shields.io/npm/v/react-emoji.svg?style=flat-square)](https://www.npmjs.com/package/react-emoji)\n\n\u003eAn emoji mixin for React\n\n## Features\n\n* Switchble emoji assets ([twemoji](https://github.com/twitter/twemoji) or [Emoji One](https://github.com/Ranks/emojione))\n* Supports emoticons such as `:) :(`\n\n## Compatible React Versions\n\nreact@0.13.x and react@0.14.x both can be used \u003c= react-emoji@0.4.x.\n\nHowever, [test code](https://github.com/banyan/react-emoji/tree/master/test) depends on react@0.14.x, it's internal though.\n\n## Demo\n\n[banyan.github.io/react-emoji](http://banyan.github.io/react-emoji/)\n\n## Install\n\n```shell\nnpm i react-emoji\n# or\nbower i react-emoji # `window.ReactEmoji` is available\n```\n\n## Usage\n\n```jsx\nlet App = React.createClass({\n  getDefaultProps() {\n    return {\n      text: \"foo bar :100: :)\",\n    };\n  },\n\n  mixins: [\n    ReactEmoji\n  ],\n\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cspan\u003e{ this.emojify(this.props.text) }\u003c/span\u003e\n        \u003cspan\u003e{ ReactEmoji.emojify(this.props.text) }\u003c/span\u003e // or can be used no mixin way\n      \u003c/div\u003e\n    );\n  }\n});\n```\n\n## API\n\n### emojify(text, options)\n\n#### Default options\n\nAll options are optional.\n\nProperties | Description | Default | Type\n---|---|---|---\nuseEmoticon | Use emoticon or not| true | Boolean\nemojiType | twemoji or emojione are available | twemoji | String\nhost | Custom host | \"\" | String\npath | Custom path | \"\" | String\next | asset ext. svg or png are available | svg | String\nattributes | Attributes such as className or onClick | {width: '20px', height: '20px'} | Object\nsingleEmoji | Show single emoji (either of annotation or emoticon), use this option if input is limited to render single emoji, this is slightly faster | false | Boolean\nstrict | Throw an error if annotation is not in dict, it's handy if emoji input is not from end user | false | Boolean\n\n## Tips\n\nIn tandem with [react-autolink](https://github.com/banyan/react-autolink).\n\n## Development\n\n### Dependency\n\n```\n$ npm i\n```\n\n\n### Run\n\n```\n$ npm start # =\u003e http://0.0.0.0:8080\n```\n\n### Test\n\n```\n$ npm test\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbanyan%2Freact-emoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbanyan%2Freact-emoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbanyan%2Freact-emoji/lists"}