Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cinaaaa/react-tagify

✨ Empower React applications with effortless #tag and @mention support
https://github.com/cinaaaa/react-tagify

component hashtags highlight highlighting mentions react react-tagify tagify

Last synced: 3 days ago
JSON representation

✨ Empower React applications with effortless #tag and @mention support

Awesome Lists containing this project

README

        

![React Tagify Promo Tweet](https://github.com/cinaaaa/react-tagify/blob/refactor/new/packages/site/src/assets/promo-tweet.png)
# ✨ React Tagify #️@
Empower your React applications with effortless #tag and @mention support ❤️


React Tagify is a powerful and pure React component for handling hashtags and mentions in your React app with ease. Give your users the ability to mention others and add tags to their content seamlessly.

For more information and demo, visit our website [here](https://react-tagify-site.vercel.app).

## Features

- 🚀 Easy to integrate
- 🎨 Customizable colors and styles
- 🔗 Supports #HashTags and @Mentions
- 📦 Lightweight

## Installation

Install the package using npm or yarn:

```bash
npm i react-tagify
```

or

```bash
yarn add react-tagify
```
## Usage

1. Import the Tagify component:

```js
import { Tagify } from 'react-tagify';
```

2. Wrap your content with the Tagify component:

```jsx
console.log(text, type)}
>


This is a #React component with help of #ReactTagify!

```

## Props

| Prop | Type | Default | Description |
|----------------|----------|---------|-------------------------------------------------------------------|
| children | ReactNode | - | The content to be processed for tags and mentions. |
| color | string | '#0073e6' | The color of the tags and mentions. |
| onClick | function | - | A callback function that is called when a tag or mention is clicked. Receives the clicked element as an argument and type of it |
| tagStyle | object | - | The CSS style object for hashtag styling. |
| mentionStyle | object | - | The CSS style object for mention styling. |
| detectHashtags | boolean | true | Enable or disable the detection of hashtags. |
| detectMentions | boolean | true | Enable or disable the detection of mentions. |

## Contributing
Please feel free to contribute by submitting a pull request or reporting any issues you encounter while using this component.

## License
React Tagify is licensed under the MIT License.