CommentComposer
The new-comment composer: a mention-aware textarea, one picker per configured facet, and a send button. Starts as a pill when collapsible. Owns only its own draft state; posting is delegated to onCreate.
Import
Section titled “Import”import { CommentComposer } from "@flanksource/clicky-ui/comments";No dedicated Storybook demo is available for this component yet.
The props table documents the component-specific surface. Standard DOM attributes inherited from React, such as className, event handlers, and accessibility attributes, may also be accepted when the component’s prop type extends a native element.
| Prop | Type | Default | Description |
|---|---|---|---|
anchor |
string | null |
— | Anchor stamped onto created comments. |
autoFocus |
boolean |
false |
Focus the input on mount. A collapsible composer also focuses when the user expands it. |
collapsible |
boolean |
true |
Start collapsed as an "Add a comment…" pill until clicked. |
config* |
CommentConfig |
— | — |
createActions |
readonly CommentCreateAction[] |
— | — |
onCancel |
(…) => void |
— | — |
onCreate |
(…) => void | Promise<void> |
— | Create a new root comment. |
onMention |
(…) => void |
— | Fired once per mention referenced by a posted comment. |
placeholder |
string |
Add a comment… |
— |