Skip to content

Commit 788b82a

Browse files
committed
docs: update readme
1 parent 965445e commit 788b82a

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

README.MD

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ A react input component that pairs text with tags, supports multiline entry, and
44

55
### [Full Documentation](https://arif-un.github.io/react-mix-tag-input/#custom-tag-view)
66

7+
<br/>
8+
<br/>
9+
10+
![mix tag input example](https://github.com/Arif-un/react-mix-tag-input/blob/master/example%20gif%20mix-tag-input.gif?raw=true)
11+
12+
<br/>
13+
<br/>
14+
715
#### Installation
816

917
```
@@ -20,24 +28,26 @@ const [value, setValue] = useState<MixInputValues>([
2028
<MixTagInput value={value} onChange={handleChange} />
2129
```
2230

31+
<br/><br/>
2332

2433
### Props
2534

2635
#### `<MixTagInput />`
2736

2837
| Prop | Description | Default | Type |
2938
|------|-------------|---------|------|
30-
| `ref` | React forwardRef with options of component | | [MixInputRef](#mixinputref-react.forwardref) |
31-
| `value` | Values of Mix Input | [] | [MixInputValues](MixInputValues) |
32-
| `onChange` | Function to handle the change event | | (value: [MixInputValues](MixInputValues)) => void |
39+
| `ref` | React forwardRef with options of component | | [MixInputRef](#mixinputref-reactforwardref) |
40+
| `value` | Values of Mix Input | [] | [MixInputValues](#mixinputvalues--string--tag) |
41+
| `onChange` | Function to handle the change event | | (value: [MixInputValues](#mixinputvalues--string--tag)) => void |
3342
| `disabled` | Boolean value to set the input as disabled | false | Boolean |
3443
| `placeholder` | Placeholder text | | string |
3544
| `immediatelyRender` | Boolean value to render the component immediately on mount. Useful for server side rendering | false | Boolean |
3645
| `tagClassName` | Class name for tags | mi-tag | string |
37-
| `editorOptions` | Options for the editor | {} | [Editor](Editor) |
46+
| `editorOptions` | Options for the editor | {} | [Editor](https://tiptap.dev/docs/editor/api/editor) |
3847
| `tagAttrs` | Allowed attributes for tags, that returns with tag value on change and also render as data-* attribute | | { [key: string]: string } |
39-
| `tagView` | Custom tag view component | | React.FC<[TagViewProps](TagViewProps)> |
48+
| `tagView` | Custom tag view component | | React.FC<[TagViewProps](https://tiptap.dev/docs/editor/extensions/custom-extensions/node-views/react#all-available-props)> |
4049

50+
<br/><br/>
4151

4252
### MixInputRef: React.forwardRef
4353

@@ -55,12 +65,14 @@ return <MixTagInput ref={ref} />;
5565

5666
| Prop | Description | Type |
5767
|------|-------------|------|
58-
| insertContent | Function to insert content in the editor current caret position, accepts Tag or Text alone or in array | (content: [Tag](Tag) \| string \| ([Tag](Tag) \| string)[]) => void |
68+
| insertContent | Function to insert content in the editor current caret position, accepts Tag or Text alone or in array | (content: [Tag](#tag) \| string \| ([Tag](#tag) \| string)[]) => void |
5969
| element | Returns the editor element | HTMLDivElement |
60-
| editor | Returns the editor instance | [Editor](Editor) |
70+
| editor | Returns the editor instance | [Editor](https://tiptap.dev/docs/editor/api/editor) |
71+
6172

73+
<br/><br/>
6274

63-
### MixInputValues: (string | Tag)[][]
75+
### MixInputValues: (string | Tag)[][]
6476

6577
```typescript
6678
const text = 'Any text string'

0 commit comments

Comments
 (0)