Mentions in TextArea for React
$ npm install --save react-textarea-mention
import React from 'react';
import Mention from 'react-textarea-mention';
const MyComponent = props => {
const handleChange = content => {
console.log(content);
}
return (
<Mention
onChange={handleChange}
field="username"
data={[
{
name: "John Doe",
username: "johndoe"
},
{
name: "Jane Good",
username: "janekesse"
},
{
name: "Kofi Ghana",
username: "kofighana"
}
]}
/>
);
};
export default MyComponent;
symbol
cssClass
data
field
onChange
renderContent
textAreaProps
Pull requests are welcome
React TextArea Mention may be freely distributed under the MIT license.