reopt design
DocsExploreTemplatesCanvasToolsPricing
Login
opt-uiopt-chartsopt-datagridopt-editoropt-calendaropt-filemanageropt-chatopt-shellbrandapp-ui
Overview205Core74Shells99Blocks32
ChatInput
reopt designreopt design

A design system for the AI era

  • Docs
  • Pricing
  • Releases
  • About
  • Contact
  • Terms of Service
  • Privacy Policy

reopt Inc.Business registration no. 217-88-02453contact@reopt.ai

© 2026 reopt Inc. All rights reserved.

ChatInput

Shell

Compose chat messages with an autoresizing textarea, file attachments, and model and style selectors.

chat
Related docs
bun add @reopt-ai/opt-ui
Install and import
bash
bun add @reopt-ai/opt-ui
tsx
import { ChatInput } from "@reopt-ai/opt-ui";

Live preview

Change the width and theme, then interact with the components.

100%
ShiftEnter로 줄바꿈

Usage examples

Chat input

ChatInput

PropTypeDefaultDescription
valuestring—제어 모드: 입력 값
onSend(message: string) => void—메시지 전송 핸들러
onFileAttach() => void—파일 첨부 클릭 핸들러
modelsChatModelDef[]—모델 선택 옵션
stylePresetsChatStylePresetDef[]—스타일 프리셋 옵션
maxRowsnumber6textarea 최대 행 수
showHintbooleantrueShift+Enter 힌트 표시 여부
labelsChatInputLabels—i18n 라벨 오버라이드

컴포넌트 의존 관계

깊이
▲ USED BY (1)▼ USES (3)chat-assistantChatInputbuttonkbdselect
View test results

테스트 커버리지

2026년 7월 9일5/5 통과
5성공
0실패
5전체
  • textarea를 렌더링한다
  • 전송 버튼을 렌더링한다
  • Shift+Enter 힌트를 표시한다
  • 입력 후 전송 시 콜백을 호출한다
  • showHint=false일 때 힌트를 숨긴다

키보드 동작

키동작
Enter메시지 전송
Shift + Enter줄바꿈

Blocks that use this component

opt-ui

ChatAssistant

Blocks

Compose an AI assistant screen with ChatSidebar, ChatMessageList, and ChatInput.

Related components

opt-ui

ChatMessageList

Shells

Display role-based chat bubbles, typing indicators, and automatic scrolling.

opt-ui

ChatSidebar

Shells

Browse and search AI conversations and start a new chat.

opt-ui

Kbd

Core

Display keyboard shortcuts as inline key badges.

opt-ui

Select

Core

Build a dropdown selection with Root, Label, Trigger, Popover, and Item components.

opt-ui

Button

Core

Use accessible buttons with primary, secondary, ghost, and danger variants, three sizes, icons, loading, and aria-busy states.

opt-ui

FaqAccordion

Shells

Organize FAQ questions and answers with Composite and Disclosure components.

PreviousChatSidebarNextChatMessageList