# RichTextMentions (@salmonui/rich-text)

> The RichTextMentions interface of @salmonui/rich-text.

Canonical: https://salmonui.dev/docs/reference/rich-text/RichTextMentions

```ts
import type { RichTextMentions } from '@salmonui/rich-text';
```

Entry index: https://salmonui.dev/docs/reference/rich-text (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/rich-text.md).

## Reference

Kind: interface

```ts
interface RichTextMentions<T = MentionItem> {
    readonly trigger?: string;
    readonly items?: readonly T[];
    readonly onSearch?: (text: string) => Promise<readonly T[]>;
    readonly renderItem?: (context: MentionRenderItemContext<T>) => ReactNode;
    readonly mentionProps?: Omit<MentionProps<T>, 'editor' | 'children' | 'target' | 'data' | 'triggers' | 'renderItem'>;
}
```

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `trigger` | `readonly trigger?: string;` | optional | Trigger character (default `'@'`). |
| `items` | `readonly items?: readonly T[];` | optional |  |
| `onSearch` | `readonly onSearch?: (text: string) => Promise<readonly T[]>;` | optional | Remote suggestions for the typed text. |
| `renderItem` | `readonly renderItem?: (context: MentionRenderItemContext<T>) => ReactNode;` | optional |  |
| `mentionProps` | `readonly mentionProps?: Omit<MentionProps<T>, 'editor' \| 'children' \| 'target' \| 'data' \| 'triggers' \| 'renderItem'>;` | optional | Further Mention props (labels, search options, events). |
