docs/components/chat-ai/MessageInput

MessageInput

Multi-line message composer.

import { MessageInput } from '@ybouhjira/hyperkit';

#Playground

Edit the code — the preview recompiles and re-renders as you type.

Live playground
Loading preview…

#More Examples

Streaming

<MessageInput isStreaming />

Disabled

<MessageInput disabled />

#Props

PropTypeDefaultDescription
onSend(message: string, attachments?: FileAttachment[]) => void
onInterrupt() => void
placeholderstring
disabledboolean
isStreamingboolean
classstring
maxLengthnumber
showCharCountboolean
enableAttachmentsboolean
acceptedFileTypesstring[]
maxFileSizenumber
maxFilesnumber
onFileError(error: string) => void
slashCommandsSlashCommand[]
onSlashCommand(command: SlashCommand) => void
mentionsMentionItem[]
messageHistorystring[]
enableVoiceboolean
enableMarkdownToolbarboolean
showShortcutHintsboolean

#Design Tokens

This component reads the following CSS custom properties. Override them globally or per-instance to restyle it — see the CSS Variables guide.

  • --sk-accent
  • --sk-accent-hover
  • --sk-bg-primary
  • --sk-bg-secondary
  • --sk-bg-tertiary
  • --sk-border
  • --sk-duration-fast
  • --sk-duration-instant
  • --sk-error
  • --sk-font-size-base
  • --sk-font-size-sm
  • --sk-font-size-xs
  • --sk-font-ui
  • --sk-height-md
  • --sk-height-sm
  • --sk-height-xs
  • --sk-icon-md
  • --sk-icon-xl
  • --sk-message-input-chip-max-w
  • --sk-message-input-chip-remove-size
  • --sk-message-input-dropdown-max-h
  • --sk-radius-lg
  • --sk-radius-md
  • --sk-radius-sm
  • --sk-radius-xl
  • --sk-shadow-lg
  • --sk-space-md
  • --sk-space-px
  • --sk-space-sm
  • --sk-space-xs
  • --sk-text-muted
  • --sk-text-on-accent
  • --sk-text-primary
  • --sk-text-secondary
  • --sk-warning
  • --sk-z-dropdown
  • --sk-z-sticky