Mention
The Mention component allows users to mention people, tags, or other entities using a prefix like @ or #.
Example Usage
afc163
zombieJ
yesmeck
No matches
Custom Prefix
You can use different prefixes like # for tags.
astro
react
vue
svelte
No matches
CustomPrefix.astro
<Mention
id='ment-hash'
label='Tags'
placeholder='Type # to tag...'
prefix='#'
options={['astro', 'react', 'vue', 'svelte']}
/> Custom Items
You can use the MentionItem component to pass custom content, such as avatars or icons.
JD
JS
No matches
JS
Multiline
Mention works great with multiline textareas.
afc163
zombieJ
yesmeck
astro
react
No matches
API
| プロパティ | 説明 | タイプ | デフォルト |
|---|---|---|---|
| options | オプションの配列(文字列、またはvalueとlabelを持つオブジェクト) | string[] | { value: string; label?: string }[] | [] |
| prefix | トリガープレフィックス文字 | string | string[] | '@' |
| ...TextInputProps | Inherits all props from TextInput | any |