Composer Suite — 3 components for comment input with @mention support.
Components
collab_composer/1— Rich text comment input with @mention trigger (PhiaCollabComposer hook)collab_mention_suggest/1— Dropdown list of @mention suggestionscollab_floating_composer/1— Absolutely-positioned composer at document anchor point
Summary
Functions
Renders a comment composer with @mention support.
Renders a composer positioned at a specific document anchor point.
Renders a dropdown of @mention suggestions.
Functions
Renders a comment composer with @mention support.
Uses the PhiaCollabComposer JS hook for real-time @mention detection,
Enter-to-submit (Shift+Enter for newline), and basic Markdown shortcuts
(Ctrl+B for bold, Ctrl+I for italic).
Attributes
:id— unique identifier (required):thread_id— associated thread ID (nil for new threads):placeholder— input placeholder text:on_submit— event name when submitting a comment:mention_suggestions— list of user maps for the mention dropdown:show_mention_dropdown— whether the mention dropdown is visible
The mention dropdown is positioned below the textarea and shows matching users as the user types after "@".
Attributes
id(:string) (required)thread_id(:string) - Defaults tonil.placeholder(:string) - Defaults to"Write a comment...".on_submit(:string) - Defaults to"collab:comment:create".mention_suggestions(:list) - Defaults to[].show_mention_dropdown(:boolean) - Defaults tofalse.class(:string) - Defaults tonil.
Renders a composer positioned at a specific document anchor point.
Used to create new threads at a specific location in the document.
The composer is absolutely positioned at (x, y) coordinates.
Attributes
id(:string) (required)x(:any) - Defaults to0.y(:any) - Defaults to0.thread_id(:string) - Defaults tonil.on_submit(:string) - Defaults to"collab:comment:create".mention_suggestions(:list) - Defaults to[].show_mention_dropdown(:boolean) - Defaults tofalse.class(:string) - Defaults tonil.
Renders a dropdown of @mention suggestions.
Each suggestion shows a small avatar (or initials circle) and the user name. Clicking a suggestion inserts the mention into the composer.
Attributes
id(:string) (required)suggestions(:list) - Defaults to[].visible(:boolean) - Defaults tofalse.on_select(:string) - Defaults to"collab:mention:select".class(:string) - Defaults tonil.