Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/cinaaaa/react-tagify
- Owner: cinaaaa
- License: mit
- Created: 2019-12-12T11:28:29.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-02T09:54:25.000Z (about 2 months ago)
- Last Synced: 2024-11-09T18:47:50.167Z (11 days ago)
- Topics: component, hashtags, highlight, highlighting, mentions, react, react-tagify, tagify
- Language: TypeScript
- Homepage: https://react-tagify-site.vercel.app
- Size: 875 KB
- Stars: 29
- Watchers: 0
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
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
```
## Usage1. 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.