Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Mentions

Mention teammates while writing a project update.

Preview

Live preview

Changes apply to this preview only.

No mention selected yet.

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Custom trigger

The trigger is configurable and allowCreate offers the current query as a new mention.

Open preview

States and suggestions

Helper text, a limited number of suggestions, several mentions in one text, and a disabled composer.

Open preview

Examples

The same field used in two real communication flows.

Open preview

Usage

Use stable mention ids and validate referenced users on the server.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluMentionsOption

Type source
PimoluMentionsOption public API
NameTypeDefaultDescription
idRequiredstring—Stable identifier reported by `onSelect`.
labelRequiredstring—Text inserted after the trigger.
descriptionstring | undefined—Optional secondary line in the suggestion list.
avatarReactNode—Optional avatar rendered before the label.
idRequired

string

No default extracted.

Stable identifier reported by `onSelect`.

labelRequired

string

No default extracted.

Text inserted after the trigger.

description

string | undefined

No default extracted.

Optional secondary line in the suggestion list.

avatar

ReactNode

No default extracted.

Optional avatar rendered before the label.

PimoluMentionsProps

Type source
PimoluMentionsProps public API
NameTypeDefaultDescription
idstring | undefined—Public Pimolu prop; see the source declaration for details.
namestring | undefined—Public Pimolu prop; see the source declaration for details.
optionsRequiredreadonly PimoluMentionsOption[]—Public Pimolu prop; see the source declaration for details.
valuestring | undefined—Controlled text value.
defaultValuestring | undefined""Initial text when uncontrolled.
onValueChange((value: string) => void) | undefined—Public Pimolu prop; see the source declaration for details.
onSelect((option: PimoluMentionsOption) => void) | undefined—Called when a suggestion is chosen or created.
triggerstring | undefined"@"Character that opens the suggestion list. Defaults to "@".
maxSuggestionsnumber | undefined6Maximum number of suggestions rendered at once.
placeholderstring | undefined"Type a message…"Public Pimolu prop; see the source declaration for details.
labelstring | undefined—Visible label associated with the control.
helperTextstring | undefined—Supporting text rendered below the field.
disabledboolean | undefinedfalsePublic Pimolu prop; see the source declaration for details.
allowCreateboolean | undefinedfalseOffer the current query as a new mention when nothing matches.
rowsnumber | undefined3Public Pimolu prop; see the source declaration for details.
maxLengthnumber | undefined—Public Pimolu prop; see the source declaration for details.
requiredboolean | undefinedfalsePublic Pimolu prop; see the source declaration for details.
fullWidthboolean | undefinedfalseUse the available width of the parent.
classNamestring | undefined—Public Pimolu prop; see the source declaration for details.
textareaClassNamestring | undefined—Public Pimolu prop; see the source declaration for details.
styleCSSProperties | undefined—Public Pimolu prop; see the source declaration for details.
aria-labelstring | undefined—Public Pimolu prop; see the source declaration for details.
aria-labelledbystring | undefined—Public Pimolu prop; see the source declaration for details.
aria-describedbystring | undefined—Public Pimolu prop; see the source declaration for details.
id

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

name

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

optionsRequired

readonly PimoluMentionsOption[]

No default extracted.

Public Pimolu prop; see the source declaration for details.

value

string | undefined

No default extracted.

Controlled text value.

defaultValue

string | undefined

Default: ""

Initial text when uncontrolled.

onValueChange

((value: string) => void) | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

onSelect

((option: PimoluMentionsOption) => void) | undefined

No default extracted.

Called when a suggestion is chosen or created.

trigger

string | undefined

Default: "@"

Character that opens the suggestion list. Defaults to "@".

maxSuggestions

number | undefined

Default: 6

Maximum number of suggestions rendered at once.

placeholder

string | undefined

Default: "Type a message…"

Public Pimolu prop; see the source declaration for details.

label

string | undefined

No default extracted.

Visible label associated with the control.

helperText

string | undefined

No default extracted.

Supporting text rendered below the field.

disabled

boolean | undefined

Default: false

Public Pimolu prop; see the source declaration for details.

allowCreate

boolean | undefined

Default: false

Offer the current query as a new mention when nothing matches.

rows

number | undefined

Default: 3

Public Pimolu prop; see the source declaration for details.

maxLength

number | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

required

boolean | undefined

Default: false

Public Pimolu prop; see the source declaration for details.

fullWidth

boolean | undefined

Default: false

Use the available width of the parent.

className

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

textareaClassName

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

style

CSSProperties | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

aria-label

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

aria-labelledby

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

aria-describedby

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

Accessibility

  • Name the editor and verify suggestion navigation, Escape and text editing without a pointer.
Read the accessibility guide →