Heading fonts

Choose a Google Fonts family. The selected font loads from Google Fonts; Inter and Geist Serif are bundled locally.

Search Reflow

Keyboard shortcuts

Use these keys while you are not typing in a field.

Search⌘K
Cycle themeT
Cycle accentA
Cycle heading fontF
Cycle radiusR
Cycle sizeS
Cycle iconsI
Cycle hoverH
Toggle navigation[
Toggle properties]
Previous / next demo slide←→
Show shortcuts?
Skip to content
Open navigationClose navigation

Make them yours

Theme
SystemT
Accent
BlueA
Heading font
InterF
Radius
RoundedR
Size
DefaultS
Icons
LucideI
Hover
FluidH

Playground variant

InputMessage

InputMessage

A message composer with an expanding text area, attachments, and a send action.

Installation

Import from the Reflow workspace package.

Playground

Open demo
Make my input box feel less stiff
    Press Tab to enter “Why is every other input box so stiff?”.
    What is Reflow about?
    How does Reflow tune the springs behind these animations?
    Install the InputMessage component in my project
    Draft a short welcome message for my app

    Basic

      Suggestions

      Press Tab in the empty composer to accept the ghost prompt, or use ArrowDown and Enter to pick one from the list.

        Press Tab to enter “Why is every other input box so stiff?”.
        What is Reflow about?
        How does Reflow tune the springs behind these animations?
        Install the InputMessage component in my project
        Draft a short welcome message for my app

        Attachments

        Use the attachment button or drop files onto the composer.

          Queued messages

            Left Slot Only

              Right Slot Only

                Suggested messages

                Use ArrowUp and ArrowDown to choose a suggestion, then Enter to accept it.

                  Summarize this document
                  Plan my next project

                  Message history

                  Press ArrowUp in an empty composer to recall a previous message.

                    Custom actions

                      Send Handler

                        Disabled

                          API Reference

                          Public props for the Reflow implementation. Native controls also accept their standard HTML attributes and Remix event mixes.

                          InputMessage

                          PropTypeDefaultDescription
                          transitionMessagesboolean—Animates a queued message into its matching sent-message bubble when view transitions are supported.
                          queuereadonly ComposerQueuedMessage[]—Controlled messages waiting for the active response to finish.
                          onQueueChange((queue: ComposerQueuedMessage[]) => void)—Receives the updated queue when messages are added, edited, reordered, or removed.
                          showQueueboolean—Displays queued messages above the composer.
                          valuestring—Current value when controlled by the parent.
                          onValueChange((value: string) => void)—Called when the selected value changes.
                          filesreadonly File[]—Controlled selected attachments.
                          onFilesChange((files: File[]) => void)—Receives attachments after adding or removing files.
                          acceptstring—Accepted file types passed to the file input.
                          filePreviewSizenumber80Size of image attachment previews in pixels.
                          minRowsnumber1Minimum visible textarea rows.
                          maxRowsnumber8Maximum visible rows before the composer scrolls.
                          size"default" | "compact"—Control density or icon-button dimensions.
                          historyreadonly string[][]Previous messages recalled with the arrow keys.
                          suggestionsreadonly string[][]Suggested messages presented while the composer is empty.
                          status"idle" | "streaming"—Whether the assistant is idle or streaming. Submissions during streaming join the queue.
                          onStop(() => void)—Called when the user stops a streaming response.
                          onSend*(message: ComposerMessage) => void | Promise<void>—Receives the submitted message and selected files.
                          labelstringMessageAccessible name or visible label for the control.
                          placeholderstringType a message…Hint shown while the value is empty.
                          placeholderSuggestionstring—Suggestion accepted with Tab while the composer is empty.
                          defaultValuestring''Initial value for an uncontrolled component.
                          disabledboolean—Prevents interaction and conveys the disabled state.
                          attachmentsbooleantrueMessage attachments, or permission to attach files in a composer.
                          maxFilesnumber5Maximum number of attachments.
                          actionsRemixNode—Actions displayed beside the message or composer.

                          ComposerMessage

                          PropTypeDefaultDescription
                          queuedIdstring—Identifier of the queued message being sent, when applicable.
                          text*string—Trimmed text of the submitted message.
                          files*readonly File[]—Files attached to the message.

                          ComposerQueuedMessage

                          PropTypeDefaultDescription
                          id*string—Stable identifier used to edit, remove, reorder, and animate the queued message.
                          queuedIdstring—Identifier of the queued message being sent, when applicable.
                          text*string—Text waiting to be submitted.
                          files*readonly File[]—Files attached to the queued message.