A comment composer: a growing input with typeahead triggers and image paste, above attach and emoji buttons and Post. It is controlled: the host owns the draft and clears it once the comment posts. Empty drafts never post.
This is the Vue port of the lab CommentComposer in Meta Astryx, aligned to v0.7.13 (including later focus behavior: disabled controls stay in the tab order, and a busy editor's Cancel link remains a tab stop). The emoji button reuses the standalone EmojiPicker. CommentThread, Comments, and CommentPin are not in this slice.
This component ships in @astryx-vue/lab and is published only under the canary tag.
Uploads attached, pasted, or dropped images and appends them as Markdown. Adds the attach button. A busy composer starts no upload.
triggers
readonly ChatComposerTrigger[]
[]
Typeahead triggers, such as an @ people search.
agentCommands
readonly CommentAgentCommand[]
[]
Agents the comment can address: typing / lists them.
hasEmojiPicker
boolean
true
Whether the emoji picker button shows.
CommentAnchor is { quote: string; status?: 'anchored' \| 'orphaned' }. CommentUploadedImage is { url: string; alt: string }. CommentHighlightColor is a palette name such as 'yellow' or 'green'.
The input grows to five lines. Enter posts; Shift+Enter inserts a newline. While an input method is composing, Enter stays with it. Clicks on empty space in the composer focus the input, except clicks on its own controls or a layer it opened.
isSubmitting does not natively disable the input, the file picker, Cancel, or Post. Attach and emoji use aria-disabled and stay focusable. Cancel in an edit context stays in the tab order and does nothing until the post finishes. Pasted or dropped images, and a second Post, are refused while busy.
CommentComposer
A comment composer: a growing input with typeahead triggers and image paste, above attach and emoji buttons and Post. It is controlled: the host owns the draft and clears it once the comment posts. Empty drafts never post.
This is the Vue port of the lab
CommentComposerin Meta Astryx, aligned to v0.7.13 (including later focus behavior: disabled controls stay in the tab order, and a busy editor's Cancel link remains a tab stop). The emoji button reuses the standaloneEmojiPicker.CommentThread,Comments, andCommentPinare not in this slice.This component ships in
@astryx-vue/laband is published only under thecanarytag.Import
CommentComposeris the standalone surface. Threads will reuseCommentComposerBasefor replies and edits.Props
value/modelValuestring''value+@changeorv-model.placeholderstring@astryx.commentComposer.placeholderlabelstringisSubmittingbooleanfalseerrorstringanchorCommentAnchorhighlightColorCommentHighlightColor'yellow'onUploadImages(files: readonly File[]) => CommentUploadedImage[] | Promise<...>triggersreadonly ChatComposerTrigger[][]@people search.agentCommandsreadonly CommentAgentCommand[][]/lists them.hasEmojiPickerbooleantrueCommentAnchoris{ quote: string; status?: 'anchored' \| 'orphaned' }.CommentUploadedImageis{ url: string; alt: string }.CommentHighlightColoris a palette name such as'yellow'or'green'.Events
change/update:modelValuevalue: stringsubmitvalue: stringretryanchor-dismissSlots
controlscomposerKeyboard and busy behavior
The input grows to five lines. Enter posts; Shift+Enter inserts a newline. While an input method is composing, Enter stays with it. Clicks on empty space in the composer focus the input, except clicks on its own controls or a layer it opened.
isSubmittingdoes not natively disable the input, the file picker, Cancel, or Post. Attach and emoji usearia-disabledand stay focusable. Cancel in an edit context stays in the tab order and does nothing until the post finishes. Pasted or dropped images, and a second Post, are refused while busy.