Skip to content
Composer, light
Light
Composer, dark
Dark

Every state

  • Composer, default, light
    Composer, default, dark

    default

  • Composer, hover, light
    Composer, hover, dark

    hover

  • Composer, focus, light
    Composer, focus, dark

    focus

  • Composer, filled, light
    Composer, filled, dark

    filled

  • Composer, mention, light
    Composer, mention, dark

    mention

  • Composer, mention-list, light
    Composer, mention-list, dark

    mention-list

  • Composer, attached, light
    Composer, attached, dark

    attached

  • Composer, sending, light
    Composer, sending, dark

    sending

  • Composer, error, light
    Composer, error, dark

    error

  • Composer, disabled, light
    Composer, disabled, dark

    disabled

Props

PropTypeDefaultWhat it does
idstring"comment-composer"Id of the text area; the list, hint and status hang off it.
labelstring"Write a comment"Accessible name of the text area.
placeholderstring"Write a comment, @ to mention someone"Placeholder.
defaultValuestring""Text in the field at the start (a draft).
attachmentsCommentComposerFile[][]Files attached at the start (a draft).
findPeople(query: string) => Promise<CommentComposerPerson[]>findLocallyFinds people for a mention; gets what was typed after @. Default: a short local list after a short wait.
send(message: CommentComposerMessage) => Promise<void>sendLocallySends 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.
acceptstring | nullnullFile types the file picker offers (the input's accept attribute). Null: any file.
sendLabelstring"Send"Send label.
sendingLabelstring"Sending…"Sending label.
sentLabelstring"Comment sent"Said to screen readers once the comment is sent.
errorTextstring"Couldn’t send your comment. It is still here, so try again in a moment."Said under the field when sending failed.
attachLabelstring"Attach files"Attach label.
mentionLabelstring"Mention someone"Mention label.
noMatchTextstring"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.
localestring"en-GB"Locale for numbers and dates.
disabledboolean–Disables it.
classNamestring–Extra classes on the outer element.

More comments

All 6
comment-02 is in UI ProGet UI Pro, €199

Preview

Open the page
In UI Pro: get it, €199 once

With every block and theme. 400+ buyers since 2020. Plans