---
title: "Message"
description: "Rows that rise out of their corner, with avatars and typing dots."
documentation: "https://beui.dev/react-native/message"
markdown: "https://beui.dev/react-native/message.md"
---

# Message

> Rows that rise out of their corner, with avatars and typing dots.

React Native component for Expo, from beUI Native. Group: AI agents. Variants: 1.

## Install

Set up beUI Native once per app first: https://beui.dev/docs/native-setup.md

```bash
npx beui-native add message
```

Or copy the source by hand and install its libraries:

```bash
npx expo install react-native-gesture-handler react-native-reanimated react-native-svg react-native-worklets
npm install uniwind tailwindcss
```

## Links

- Source: https://github.com/starc007/beui-native/tree/main/src/components/message
- Registry JSON with every file: https://beui.dev/native/r/message
- Open in Expo Go: exp://u.expo.dev/93a3a95c-6dc2-4adb-b57c-efbecf859f25/--/message?runtime-version=exposdk%3A58.0.0&channel-name=production
- Web version: https://beui.dev/components/agents/message.md

## README

### Message

Native port of [beUI Message](https://beui.dev/components/agents/message): the row around chat bubbles, with avatars, metadata and a typing indicator.

```tsx
import {
  Message,
  MessageAvatar,
  MessageBubble,
  MessageContent,
  MessageGroup,
  MessageHeader,
  MessageStatus,
  MessageTyping,
} from "./src";

<MessageGroup spacing="default">
  <Message from="user" animateIn>
    <MessageAvatar>Y</MessageAvatar>
    <MessageContent>
      <MessageHeader>You</MessageHeader>
      <MessageBubble variant="solid">Can you summarize the notes?</MessageBubble>
      <MessageStatus time="9:41" delivery="delivered" />
    </MessageContent>
  </Message>
  <Message from="assistant">
    <MessageAvatar>AI</MessageAvatar>
    <MessageContent>
      <MessageBubble>
        <MessageTyping />
      </MessageBubble>
    </MessageContent>
  </Message>
</MessageGroup>
```

#### Parts

- `Message` sets the side: user rows sit on the trailing side with the avatar after the content, and bubbles inside follow.
- `MessageAvatar` is a 28 point circle for initials, an image or an icon. `placeholder` keeps the slot empty so grouped replies stay aligned.
- `MessageHeader` and `MessageFooter` are small muted lines above and below the bubbles.
- `MessageStatus` sits under the bubbles with the time and delivery state, such as "9:41 · Delivered". `delivery` is `sending` (a clock), `sent` (one check), `delivered` (two checks), `read` (two blue checks) or `failed`. The label rolls and the icon swaps as it changes. Leave out `delivery` for just the time, or hide the word with `showLabel={false}`.
- `MessageMarker` is a centered pill for dates and system notes.
- `MessageTyping` shows three dots that rise and fade in turn.
- `MessageGroup` stacks rows 6 points apart, or 16 with `spacing="default"`.

#### Motion

`animateIn` rises the row 8 points out of its trailing bottom corner as it scales from 0.95, on a spring (stiffness 480, damping 32, mass 0.62), once on mount. Use it for messages the person sends. The typing dots each rise 2 points and brighten over a 1050 ms cycle, 140 ms apart.

#### Accessibility

- The typing indicator is a progress bar named "Responding". Change it with `label`.
- Placeholder avatars are hidden from screen readers.
- Reduced motion, or `disableAnimation`, shows rows without the rise and holds the dots still.

Copy this directory and `components/message-bubble/` with its files, `hooks/use-reduced-motion.ts`, `styles/motion.ts`, and the semantic tokens in `styles/theme.css`.
