Rebar UI

1.0

synthetic

AiChatInput

A composer that grows with the message.

Project assistantSend, dictate, intent
Command
Dictating
Disabled

In context

Assistant on a phoneComposer pinned under the thread
Assistant

Who owns offline sync for tasks?

Jonas Weber. It is in review.

Boxed variant

Bar and boxvariant="boxed" singleLine: a surface bar with a top rule, a rounded field and a separate round button
Typed
Recording
Transcribing
Disabled
Send only
With notice
Couldn't reach the catechist.

Mic and send morph

Dictation composerEmpty shows the mic; text morphs it to Send. Mic starts recording, again stops and transcribes

Recording is simulated; the caller owns the real speech-to-text.

Blocked statesEvery state that stops sending explains itself

Disabled while the catechist replies

Offline

You’re offline.

Quota exceeded

You’ve used today’s questions.

Transcribing

Props

PropTypeRequiredDefault
valuestring | undefinedNo—
defaultValuestring | undefinedNo
onValueChange((value: string) => void) | undefinedNo—
onSend((value: string) => void) | undefinedNo—
placeholderstring | undefinedNo—
intentAiChatInputIntent | undefinedNomessage
dictationboolean | undefinedNofalse
dictatingboolean | undefinedNofalse
onDictationToggle((active: boolean) => void) | undefinedNo—
disabledReactNodeNo—
onDictate(() => void) | undefinedNo—
recordingboolean | { seconds: number; } | undefinedNofalse
transcribingboolean | undefinedNofalse
bannerReactNodeNo—
sendIconReactNodeNo—
micIconReactNodeNo—
maxRowsnumber | undefinedNo6
maxLengthnumber | undefinedNo—
showCounterboolean | undefinedNofalse
submitOnEnterboolean | undefinedNotrue
variant"default" | "boxed" | undefinedNodefault
singleLineboolean | undefinedNofalse
busyIconReactNodeNo—
aria-labelstring | undefinedNo—
classNamestring | undefinedNo—

Accessibility

A real <textarea> (labelled by aria-label, default "Chat message") that grows to maxRows then scrolls. Enter sends, Shift+Enter breaks a line. The send and dictation controls are real buttons with text labels; onSend never fires for an empty draft.

data-rebar-* attributes

data-rebar-component="ai-chat-input", data-rebar-intent; parts: textarea, actions, dictation-button (carries data-rebar-active while dictating), send-button.

Migrating to Ant Design

Not codemod-covered: AntD has no AI chat input. Compose Input.TextArea (autoSize) with a send button, or use Ant Design X's Sender.

maxLength, counter and Enter behaviour

maxLength caps the message (typing and pasting stop at it); showCounter adds a live "n / max" counter that turns to the danger tone at 90%. submitOnEnter={false} makes Enter add a line so sending happens only from the button (default true: Enter sends, Shift+Enter adds a line).

<AiChatInput maxLength={500} showCounter submitOnEnter={false} onSend={send} />