Skip to content

Commit d63c7c2

Browse files
rheaditiabinavseelan
authored andcommitted
🌟Add shield badges (#5)
1 parent e0d5e55 commit d63c7c2

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# React Input Trigger
22

3-
React component for handling character triggers inside textareas and input fields. 🐼
3+
4+
[![npm](https://img.shields.io/npm/v/react-input-trigger.svg?style=flat-square)](https://www.npmjs.com/package/react-input-trigger)
5+
[![npm](https://img.shields.io/npm/l/react-input-trigger.svg?style=flat-square)](https://github.com/abinavseelan/react-input-trigger)
6+
[![npm](https://img.shields.io/npm/dt/react-input-trigger.svg?style=flat-square)](https://www.npmjs.com/package/react-input-trigger)
7+
8+
> React component for handling character triggers inside textareas and input fields. 🐼
9+
10+
## Description
411

512
Useful for building applications that need Slack-like emoji suggestions (triggered by typing `:`) or Github-like user mentions (triggered by typing `@`).
613

@@ -16,7 +23,7 @@ The hooks pass some meta-data such as the cursor position and/or the text that h
1623

1724
## Demo
1825

19-
A live demo of this component can be found [here](https://abinavseelan.com/react-input-trigger)
26+
A live demo of this component can be found [here](https://abinavseelan.com/react-input-trigger).
2027

2128
A detailed guide on using this component to build a Github-style user mentions component [can be found on CampVanilla](https://blog.campvanilla.com/reactjs-input-trigger-github-twitter-mentions-8ad1d878110d).
2229

@@ -29,7 +36,6 @@ A detailed guide on using this component to build a Github-style user mentions c
2936
$ npm install react-input-trigger
3037
```
3138

32-
3339
* Import the component from the package.
3440

3541
```js
@@ -44,6 +50,16 @@ import InputTrigger from 'react-input-trigger';
4450
</InputTrigger>
4551
```
4652

53+
---
54+
55+
Or get it in the browser directly via [unpkg](https://unpkg.com/react-input-trigger@latest/build/lib/react-input-trigger.js):
56+
```html
57+
<script
58+
src="https://unpkg.com/react-input-trigger@latest/build/lib/react-input-trigger.js"
59+
type="text/javascript">
60+
</script>
61+
```
62+
4763
## Component Props
4864

4965
`<InputTrigger>` can take in the following props:

0 commit comments

Comments
 (0)