Chat Input

An auto-resizing multi-line text input tailored for conversational chat prompts.

The ChatInput component is a streamlined textarea that automatically grows with input height and handles Enter submission.

Usage

tsx
import * as React from "react"import { ChatInput } from "@celestia-project/ui"
export function MyChatInput() {  const [text, setText] = React.useState("")
  return (    <ChatInput      value={text}      onChange={(e) => setText(e.target.value)}      placeholder="Type a message..."      className="w-full max-w-md"    />  )}

Props Reference

ComponentPropTypeDescription
ChatInputvaluestringControlled textarea text.
ChatInputonChange(e: ChangeEvent<HTMLTextAreaElement>) => voidChange event handler.
ChatInputplaceholderstringPlaceholder prompt hint.