

Every state


default


hover


focus


filled


mention


mention-list


attached


sending


error


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "comment-composer" | Id of the text area; the list, hint and status hang off it. |
| label | string | "Write a comment" | Accessible name of the text area. |
| placeholder | string | "Write a comment, @ to mention someone" | Placeholder. |
| defaultValue | string | "" | Text in the field at the start (a draft). |
| attachments | CommentComposerFile[] | [] | Files attached at the start (a draft). |
| findPeople | (query: string) => Promise<CommentComposerPerson[]> | findLocally | Finds people for a mention; gets what was typed after @. Default: a short local list after a short wait. |
| send | (message: CommentComposerMessage) => Promise<void> | sendLocally | Sends the comment; reject (or throw) when it failed. Default: a short local wait that succeeds. |
| onSent | (message: CommentComposerMessage) => void | – | Called with the comment once it is sent. |
| accept | string | null | null | File types the file picker offers (the input's accept attribute). Null: any file. |
| sendLabel | string | "Send" | Send label. |
| sendingLabel | string | "Sending…" | Sending label. |
| sentLabel | string | "Comment sent" | Said to screen readers once the comment is sent. |
| errorText | string | "Couldn’t send your comment. It is still here, so try again in a moment." | Said under the field when sending failed. |
| attachLabel | string | "Attach files" | Attach label. |
| mentionLabel | string | "Mention someone" | Mention label. |
| noMatchText | string | "No one on the team matches" | Shown in the list when no one matches. |
| hint | { send: string; newLine: string } | null | { send: "to send", newLine: "new line" } | The keyboard hint beside the buttons. Null: no hint. |
| locale | string | "en-GB" | Locale for numbers and dates. |
| disabled | boolean | – | Disables it. |
| className | string | – | Extra classes on the outer element. |
More comments
All 6comment-02 is in UI ProGet UI Pro, €199


