Skip to content

mkhstar/react-textarea-mention

Repository files navigation

react-textarea-mention

Mentions in TextArea for React

NPM JavaScript Style Guide

Install

npm

$ npm install --save react-textarea-mention

Getting Started

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;

Example

React Textarea Mention

Props

symbol

cssClass

data

field

onChange

renderContent

textAreaProps

More Coming Up...

Pull Requests

Pull requests are welcome

License

React TextArea Mention may be freely distributed under the MIT license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published