Components

MentionChip

A standalone "@mention" chip, for reading one outside a mounted RichTextEditor.

Available since@crisp-ui-kit/crisp@0.54.2

The same look RichTextEditor draws inline while an editor is live (.crisp-rte-mention), exported on its own for a consumer rendering a mention OUTSIDE a mounted editor: a comment thread, a note's collapsed preview, anywhere a stored @[Name](actor:id)-shaped token needs to read as a person, not literal markup.

Loop in @Ada Lovelace on this one.

Installation

npm install @crisp-ui-kit/crisp

Props

Prop

Type

Notes

  • Renders whatever children is given — the trigger character included, if the caller wants one, matching how RichTextEditor's own chip includes it — rather than assuming an @ prefix itself.
  • Plain text, no built-in click/remove behaviour: none was asked for, and none is guessed — the same reasoning Chip's own docs give for not inventing a remove affordance.
  • asChild renders the given element directly, with no wrapping <span> — for a mention that should itself be a real link (<a href="/person/123">).

On this page