Skip to content
synccn

Chat Bubble

Message bubbles, read status and a typing indicator.

Did the new pricing block ship?
R
The yearly toggle looked great in review.
10:41
Shipped this morning 🎉 It's live on the blocks page.
10:42 · Read
R

Installation

$ pnpm dlx shadcn@latest add @synccn/chat

First time in this project? Connect synccn with one command.

Usage

import { ChatBubble, TypingIndicator } from "@/components/ui/chat";<ChatBubble from="me" time="10:42">Shipped!</ChatBubble>

API reference

Generated from the component's TypeScript types, so it always matches the code.

ChatBubble

Message bubble. Consecutive messages from the same sender hide the repeated avatar.

  • from
    "me" | "them"

    Default "them"

    Which side the bubble sits on.

  • name
    string

    Sender name, used for the avatar.

  • time
    string

    Time under the bubble.

  • showAvatar
    boolean

    Default true

    Hide for consecutive messages from the same sender.

  • status
    string

    Delivery status, e.g. Read.

  • children
    React.ReactNode

    Content to render.

TypingIndicator

Three bouncing dots shown while the other person is typing.

  • name
    string

    Who is typing.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Components

Helpers

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

  • ARIA attributes: aria-label