Skip to content

Chat input

The chat input is a text field for composing and submitting messages in conversational interfaces. It supports both AI-assisted interactions and human-to-human chat.

Usage

The chat input enables users to send messages or comments depending on context:

  • User chat: Sends real-time messages in a conversation
  • AI chat: Submits queries to a system for response
  • Commenting: Adds contextual feedback or notes tied to a specific element

chat input example

When to use

  • In any interface where users need to communicate or leave feedback.
  • When freeform text input is required in chat, messaging, or commenting scenarios.

Best practices

  • Always autofocus the input prompt when the page or chat view is opened.
  • Limit input width to 720px for legibility.
  • Match placeholder text to context (e.g., “Ask anything”, “Type a message”, “Leave a comment”).
  • Disable the send button when input is empty or invalid.
  • Add the legal disclaimer when used for AI functions.

Except where otherwise noted, content on this site is licensed under MIT License.