Gathering detailed insights and metrics for @rc-component/mentions
Gathering detailed insights and metrics for @rc-component/mentions
Gathering detailed insights and metrics for @rc-component/mentions
Gathering detailed insights and metrics for @rc-component/mentions
npm install @rc-component/mentions
Typescript
Module System
Node Version
NPM Version
@rc-component/mentions@1.3.0
Updated on Jun 10, 2025
v2.20.0
Updated on Apr 11, 2025
@rc-component/mentions@1.2.0
Updated on Apr 03, 2025
@rc-component/mentions@1.1.5
Updated on Mar 03, 2025
@rc-component/mentions@1.1.4
Updated on Feb 28, 2025
@rc-component/mentions@1.1.3
Updated on Feb 26, 2025
TypeScript (95.41%)
Less (2.97%)
JavaScript (1.49%)
Shell (0.12%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
99 Stars
233 Commits
57 Forks
5 Watchers
9 Branches
46 Contributors
Updated on Jul 14, 2025
Latest Version
1.3.0
Package Id
@rc-component/mentions@1.3.0
Unpacked Size
71.31 kB
Size
12.95 kB
File Count
39
NPM Version
10.9.2
Node Version
22.15.1
Published on
Jun 10, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
6
1/** 2 * inline: true 3 */ 4import Mentions from '@rc-component/mentions'; 5// Import the default styles 6import './index.less'; 7 8const { Option } = Mentions; 9 10var Demo = ( 11 <Mentions> 12 <Option value="light">Light</Option> 13 <Option value="bamboo">Bamboo</Option> 14 <Option value="cat">Cat</Option> 15 </Mentions> 16); 17React.render(<Demo />, container);
Note: We use index.less for styling, you can convert them into css and properly reference them to the code above.
name | description | type | default |
---|---|---|---|
autoFocus | Auto get focus when component mounted | boolean | false |
defaultValue | Default value | string | - |
filterOption | Customize filter option logic | false | (input: string, option: OptionProps) => boolean | - |
notFoundContent | Set mentions content when not match | ReactNode | 'Not Found' |
placement | Set popup placement | 'top' | 'bottom' | 'bottom' |
direction | Set popup direction | 'ltr' | 'rtl' | 'ltr' |
prefix | Set trigger prefix keyword | string | string[] | '@' |
rows | Set row count | number | 1 |
split | Set split string before and after selected mention | string | ' ' |
silent | Used in transition phase, does not respond to keyboard enter events when equal to true | boolean | false |
validateSearch | Customize trigger search logic | (text: string, props: MentionsProps) => void | - |
value | Set value of mentions | string | - |
onChange | Trigger when value changed | (text: string) => void | - |
onKeyDown | Trigger when user hits a key | React.KeyboardEventHandler<HTMLTextAreaElement> | - |
onKeyUp | Trigger when user releases a key | React.KeyboardEventHandler<HTMLTextAreaElement> | - |
onSelect | Trigger when user select the option | (option: OptionProps, prefix: string) => void | - |
onSearch | Trigger when prefix hit | (text: string, prefix: string) => void | - |
onFocus | Trigger when mentions get focus | React.FocusEventHandler<HTMLTextAreaElement> | - |
onBlur | Trigger when mentions lose focus | React.FocusEventHandler<HTMLTextAreaElement> | - |
getPopupContainer | DOM Container for suggestions | () => HTMLElement | - |
autoSize | Textarea height autosize feature, can be set to true|false or an object { minRows: 2, maxRows: 6 } | boolean | object | - |
onPressEnter | The callback function that is triggered when Enter key is pressed | function(e) | - |
onResize | The callback function that is triggered when textarea resize | function({ width, height }) | - |
name | description |
---|---|
focus() | Component get focus |
blur() | Component lose focus |
npm install
npm start
online example: http://react-component.github.io/mentions/
npm test
npm run coverage
rc-mentions is released under the MIT license.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 10/29 approved changesets -- score normalized to 3
Reason
3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More