Skip to content
MoonUIMoonUI
ComponentsTemplatesPricing
Sign inGet started

Getting started

  • Introduction
  • Installation
  • CDN
  • Authentication
  • shadcn CLI
  • MCP Server
  • Usage

Components

Foundation25 components
  • Alert
  • Aspect Ratio
  • Avatar
  • Badge
  • Button
  • Button Group
  • Checkbox
  • File Upload
  • Input
  • Kbd
  • Label
  • Radio Group
  • Rating
  • Select
  • Slider
  • Switch
  • Textarea
  • Toggle
  • Toggle Group
  • Separator
  • Tags Input
  • Color Picker
  • Date Picker
  • Simple Editor
  • Input OTP
Layout10 components
  • Accordion
  • Breadcrumb
  • Card
  • Carousel
  • Collapsible
  • ResizablePro
  • Scroll Area
  • StepperPro
  • Table
  • Tabs
Navigation & Overlays11 components
  • Alert DialogPro
  • Command
  • Context MenuPro
  • Dialog
  • Dropdown Menu
  • Hover CardPro
  • MenubarPro
  • Pagination
  • Popover
  • SheetPro
  • Tooltip
Feedback4 components
  • Progress
  • Skeleton
  • Spinner
  • Toast
Data & Analytics4 components
  • Data TablePro
  • Advanced ChartPro
  • DashboardPro
  • WidgetsPro
Navigation4 components
  • Command AI+Pro
  • SidebarPro
  • NavbarPro
  • Navigation MenuPro
AI Chat4 components
  • MessagePro
  • Message ScrollerPro
  • AttachmentPro
  • Conversation MarkerPro
Content Management6 components
  • Advanced FormsPro
  • Form WizardPro
  • Quiz FormPro
  • Credit Card InputPro
  • Phone Number InputPro
  • Rich Text EditorPro
Project Management3 components
  • KanbanPro
  • TimelinePro
  • CalendarPro
Performance & Utility8 components
  • Virtual ListPro
  • Memory Efficient DataPro
  • Lazy ComponentPro
  • Optimized ImagePro
  • Performance MonitorPro
  • Performance DebuggerPro
  • Error BoundaryPro
  • Health CheckPro
Interactive & Animation15 components
  • Animated NumberPro
  • Floating DockPro
  • Text RevealPro
  • Image ComparePro
  • Splash CursorPro
  • GitHub StarsPro
  • Animated ButtonPro
  • Magnetic ButtonPro
  • Magnetic ElementsPro
  • Mouse TrailPro
  • Hover Card 3DPro
  • Spotlight CardPro
  • Floating Action ButtonPro
  • LightboxPro
  • Media GalleryPro
Gesture & Touch7 components
  • Swipeable CardPro
  • Draggable ListPro
  • Pinch ZoomPro
  • Swipe ActionsPro
  • Gesture DrawerPro
  • Click AnimationsPro
  • Touch GesturesPro
Text Animations12 components
  • Text HighlighterPro
  • Typewriter TextPro
  • Scrambled TextPro
  • Word RotatePro
  • Morphing TextPro
  • Flip TextPro
  • Number TickerPro
  • Glitch TextPro
  • Shiny TextPro
  • Wavy TextPro
  • Gradient TextPro
  • Text 3DPro
Animations12 components
  • Animated ListPro
  • Bounce EffectPro
  • Blur FadePro
  • Elastic AnimationPro
  • MarqueePro
  • Parallax ScrollPro
  • Reveal CardsPro
  • Scroll RevealPro
  • Fade TransitionsPro
  • Focus TransitionsPro
  • Path AnimationsPro
  • SVG AnimationsPro
Layouts1 components
  • Bento GridPro
Effects9 components
  • ConfettiPro
  • Cursor TrailPro
  • Glow EffectPro
  • Pixel ImagePro
  • Neon EffectPro
  • ShimmerPro
  • RipplePro
  • SparklesPro
  • SpotlightPro
Backgrounds17 components
  • Grid PatternPro
  • MeteorsPro
  • Aurora BackgroundPro
  • ParticlesPro
  • StarfieldPro
  • Dot PatternPro
  • Grid DistortionPro
  • WavesPro
  • Matrix RainPro
  • Liquid BackgroundPro
  • Mesh GradientPro
  • Glitch BackgroundPro
  • Gradient FlowPro
  • Floating ElementsPro
  • Bubble BackgroundPro
  • Geometric PatternsPro
  • Code SnippetsPro
Special UI1 components
  • Glow CardPro
Showcase8 components
  • iPhone MockPro
  • Android MockPro
  • Safari MockPro
  • GlobePro
  • Dotted MapPro
  • Icon CloudPro
  • Tweet CardPro
  • File TreePro

Advanced

  • Theming
  • Customization
  • CLI
  • Help & Support
  1. Docs
  2. Components
  3. Message

Message

Pro

A composition-based chat message family for AI and messaging interfaces. A Message row with align-aware layout and semantic sender roles, plus Avatar, Header, Content, and Footer slots around a MessageBubble surface with four variants, grouping, and a reactions slot.

Pro features

What the Pro version adds to this component.

  • Chat-Ready Composition

    A Message row with Avatar, Header, Content, and Footer slots around the MessageBubble surface — compose exactly the message anatomy your UI needs

  • Align-Aware Layout

    Set align once on Message and it flows to content and bubble corners via context — start for received, end for sent messages

  • Four Bubble Variants

    Default, muted, primary, and outline surfaces built on design tokens, so dark mode works automatically

  • Message Grouping

    The grouped prop flattens corners on the aligned side so consecutive messages from one sender read as a single block

  • Reactions Slot

    An absolutely positioned bottom-right slot on the bubble for emoji reaction chips or any custom ReactNode

  • Semantic and Accessible

    role=article by default with an htmlRole escape hatch for list semantics, plus data-role and data-align hooks for styling and analytics

Installation

Install via CLI

npx @moontra/moonui-cli add message

Usage

Pro required
NV
Nova
Hi Maya! The staging deploy finished — the build passed on the first try.
14:02
MK
Maya
Great news! Can you run the accessibility audit next?
14:03
NV
Nova
On it — results should be ready in about two minutes.
14:03
MK
Maya
Perfect, thank you!
14:04

Examples

Basic Conversation

Pro

A short exchange between an assistant and the current user. Received messages use align start with the muted bubble, sent messages use align end with the primary bubble; each message composes Avatar, Header, Content, and Footer slots.

Pro required

Grouped Messages

Pro

Mark follow-up messages from the same sender with the grouped prop: the corners on the aligned side flatten, so consecutive bubbles read as one visual block while the first message keeps its rounded tail.

Pro required

Reactions and Variants

Pro

The reactions slot renders chips in an absolutely positioned area at the bottom-right edge of the bubble — give the bubble bottom margin (mb-3) so following content does not overlap. Below it, the four bubble variants side by side: default, muted, primary, and outline.

Pro required

System Messages and List Semantics

Pro

role="system" marks informational rows — center them with justify-center and a pill-shaped outline bubble. When rendering a conversation inside a role="list" container, pass htmlRole="listitem" so each message becomes a valid list item instead of the default article.

Pro required

Swipe to Reply

Pro

Message does not bake swiping in — it composes: wrap each Message in the SwipeActions component for WhatsApp-style chat interactions. Drag a message right to reply (a reply bar appears below the thread) or left to add a reaction chip; arrow keys trigger the same actions for keyboard users.

Pro required
Previous
Navigation Menu
Pro
Next
Message Scroller
Pro
MoonUIMoonUI

168 React components. 45 free under MIT, 123 Pro.

Unsubscribe anytime.

Product

  • Components
  • Templates
  • Pricing

Resources

  • Documentation
  • GitHub
  • Support

Legal

  • Privacy
  • Terms
  • Refund Policy
Made by Moontra Software
  • X
  • LinkedIn
  • GitHub
  • YouTube