{"id":22267503,"url":"https://github.com/react-component/mentions","last_synced_at":"2026-04-01T19:55:40.021Z","repository":{"id":34866661,"uuid":"184977139","full_name":"react-component/mentions","owner":"react-component","description":"React Mentions","archived":false,"fork":false,"pushed_at":"2026-03-21T05:58:10.000Z","size":12061,"stargazers_count":108,"open_issues_count":33,"forks_count":62,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-03-21T07:19:53.528Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rc-mentions.react-component.now.sh","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/react-component.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-05-05T03:58:41.000Z","updated_at":"2026-03-21T05:57:38.000Z","dependencies_parsed_at":"2023-02-16T11:35:20.370Z","dependency_job_id":"6d750cce-276a-4f32-8642-c10553713870","html_url":"https://github.com/react-component/mentions","commit_stats":{"total_commits":143,"total_committers":17,"mean_commits":8.411764705882353,"dds":0.4825174825174825,"last_synced_commit":"1100f4d16e605e59bb1cb21ebe12d645cc6388f3"},"previous_names":[],"tags_count":94,"template":false,"template_full_name":null,"purl":"pkg:github/react-component/mentions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fmentions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fmentions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fmentions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fmentions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-component","download_url":"https://codeload.github.com/react-component/mentions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fmentions/sbom","scorecard":{"id":765383,"data":{"date":"2025-08-11","repo":{"name":"github.com/react-component/mentions","commit":"252463813a792d60b6c4897402c6c0e29fec56a2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Code-Review","score":3,"reason":"Found 10/29 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:5: update your workflow using https://app.stepsecurity.io/secureworkflow/react-component/mentions/main.yml/master?enable=pin","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T00:37:33.047Z","repository_id":34866661,"created_at":"2025-08-23T00:37:33.047Z","updated_at":"2025-08-23T00:37:33.047Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-12-03T11:06:51.050Z","updated_at":"2026-04-01T19:55:39.981Z","avatar_url":"https://github.com/react-component.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rc-mentions\n\n[![NPM version][npm-image]][npm-url]\n[![npm download][download-image]][download-url]\n[![build status][github-actions-image]][github-actions-url]\n[![Codecov][codecov-image]][codecov-url]\n[![bundle size][bundlephobia-image]][bundlephobia-url]\n[![dumi][dumi-image]][dumi-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-mentions.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-mentions\n[travis-image]: https://img.shields.io/travis/react-component/mentions/master?style=flat-square\n[travis-url]: https://travis-ci.com/react-component/mentions\n[github-actions-image]: https://github.com/react-component/mentions/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/mentions/actions\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/mentions/master.svg?style=flat-square\n[codecov-url]: https://app.codecov.io/gh/react-component/mentions\n[david-url]: https://david-dm.org/react-component/mentions\n[david-image]: https://david-dm.org/react-component/mentions/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/mentions?type=dev\n[david-dev-image]: https://david-dm.org/react-component/mentions/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/rc-mentions.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-mentions\n[bundlephobia-url]: https://bundlephobia.com/package/rc-mentions\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-mentions\n[dumi-url]: https://github.com/umijs/dumi\n[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square\n\n## Screenshots\n\n\u003cimg src=\"https://user-images.githubusercontent.com/5378891/57270992-2fd48780-70c0-11e9-91ae-c614d0b49a45.png\" /\u003e\n\n## Feature\n\n- support ie9,ie9+,chrome,firefox,safari\n\n### Keyboard\n\n- Open mentions (focus input || focus and click)\n- KeyDown/KeyUp/Enter to navigate menu\n\n## install\n\n[![rc-mentions](https://nodei.co/npm/rc-mentions.png)](https://npmjs.org/package/rc-mentions)\n\n## Usage\n\n### basic use\n\n```js\n/**\n * inline: true\n */\nimport Mentions from '@rc-component/mentions';\n// Import the default styles\nimport './index.less';\n\nconst { Option } = Mentions;\n\nvar Demo = (\n  \u003cMentions\u003e\n    \u003cOption value=\"light\"\u003eLight\u003c/Option\u003e\n    \u003cOption value=\"bamboo\"\u003eBamboo\u003c/Option\u003e\n    \u003cOption value=\"cat\"\u003eCat\u003c/Option\u003e\n  \u003c/Mentions\u003e\n);\nReact.render(\u003cDemo /\u003e, container);\n```\n\n**Note:** We use [index.less](https://github.com/react-component/mentions/blob/master/assets/index.less) for styling, you can convert them into css and properly reference them to the code above.\n\n## API\n\n### Mentions props\n\n| name              | description                                                                                             | type                                                       | default     |\n| ----------------- | ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | ----------- |\n| autoFocus         | Auto get focus when component mounted                                                                   | `boolean`                                                  | `false`     |\n| defaultValue      | Default value                                                                                           | `string`                                                   | -           |\n| filterOption      | Customize filter option logic                                                                           | `false \\| (input: string, option: OptionProps) =\u003e boolean` | -           |\n| notFoundContent   | Set mentions content when not match                                                                     | `ReactNode`                                                | 'Not Found' |\n| placement         | Set popup placement                                                                                     | `'top' \\| 'bottom'`                                        | 'bottom'    |\n| direction         | Set popup direction                                                                                     | `'ltr' \\| 'rtl'`                                           | 'ltr'       |\n| prefix            | Set trigger prefix keyword                                                                              | `string \\| string[]`                                       | '@'         |\n| rows              | Set row count                                                                                           | `number`                                                   | 1           |\n| split             | Set split string before and after selected mention                                                      | `string`                                                   | ' '         |\n| silent            | Used in transition phase, does not respond to keyboard enter events when equal to `true`                | `boolean`                                                  | `false`     |\n| validateSearch    | Customize trigger search logic                                                                          | `(text: string, props: MentionsProps) =\u003e void`             | -           |\n| value             | Set value of mentions                                                                                   | `string`                                                   | -           |\n| onChange          | Trigger when value changed                                                                              | `(text: string) =\u003e void`                                   | -           |\n| onKeyDown         | Trigger when user hits a key                                                                            | `React.KeyboardEventHandler\u003cHTMLTextAreaElement\u003e`          | -           |\n| onKeyUp           | Trigger when user releases a key                                                                        | `React.KeyboardEventHandler\u003cHTMLTextAreaElement\u003e`          | -           |\n| onSelect          | Trigger when user select the option                                                                     | `(option: OptionProps, prefix: string) =\u003e void`            | -           |\n| onSearch          | Trigger when prefix hit                                                                                 | `(text: string, prefix: string) =\u003e void`                   | -           |\n| onFocus           | Trigger when mentions get focus                                                                         | `React.FocusEventHandler\u003cHTMLTextAreaElement\u003e`             | -           |\n| onBlur            | Trigger when mentions lose focus                                                                        | `React.FocusEventHandler\u003cHTMLTextAreaElement\u003e`             | -           |\n| getPopupContainer | DOM Container for suggestions                                                                           | `() =\u003e HTMLElement`                                        | -           |\n| autoSize          | Textarea height autosize feature, can be set to `true\\|false` or an object `{ minRows: 2, maxRows: 6 }` | `boolean \\| object`                                        | -           |\n| onPressEnter      | The callback function that is triggered when Enter key is pressed                                       | `function(e)`                                              | -           |\n| onResize          | The callback function that is triggered when textarea resize                                            | `function({ width, height })`                              | -           |\n\n### Methods\n\n| name    | description          |\n| ------- | -------------------- |\n| focus() | Component get focus  |\n| blur()  | Component lose focus |\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## Example\n\nhttp://localhost:9001/\n\nonline example: http://react-component.github.io/mentions/\n\n## Test Case\n\n```\nnpm test\n```\n\n## Coverage\n\n```\nnpm run coverage\n```\n\n## License\n\nrc-mentions is released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Fmentions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-component%2Fmentions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Fmentions/lists"}