Chat Message

A single chat turn: the user's message in a muted bubble aligned to the end, the assistant's as bare text at the start. Built on Message and Bubble.

Open the preview in a new tab

The source comes with full access.

One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.

Installation

pnpm dlx shadcn add @01orbital/chat-message
npx shadcn add @01orbital/chat-message
yarn shadcn add @01orbital/chat-message
bunx --bun shadcn add @01orbital/chat-message

Part of the 01orbital library. With a license, put ORBITAL_TOKEN in .env.local and the same command installs it (licensed install, pricing).

It lands at components/chat/chat-message.tsx, as source you own and edit.

Usage

import { ChatMessage } from "@/components/chat/chat-message"

// Every word on the page. Change copy here, not in the markup.
const COPY = {
  body: "My words sit in a filled bubble, on the right.",
  body2:
    "The assistant answers in bare prose on the ground, using the full column — no bubble, no border. The whitespace is the boundary.",
} as const

export default function ChatMessageDemo() {
  return (
    <div className="flex max-w-md flex-col gap-10">
      <ChatMessage variant="mine">{COPY.body}</ChatMessage>
      <ChatMessage variant="theirs">{COPY.body2}</ChatMessage>
    </div>
  )
}

Examples

01

chat-message-demo

Example 01 · chat-message-demo

Demo

Chat Message both ways: the person's message in a bubble on the right, the assistant's reply as bare text on the left.

pnpm dlx shadcn add @01orbital/chat-message-demo
npx shadcn add @01orbital/chat-message-demo
yarn shadcn add @01orbital/chat-message-demo
bunx --bun shadcn add @01orbital/chat-message-demo

The source comes with full access.

One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.

02

chat-message-mine

Example 02 · chat-message-mine

Mine

The person's own message: variant mine, on the right in a soft bubble.

pnpm dlx shadcn add @01orbital/chat-message-mine
npx shadcn add @01orbital/chat-message-mine
yarn shadcn add @01orbital/chat-message-mine
bunx --bun shadcn add @01orbital/chat-message-mine

The source comes with full access.

One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.

03

chat-message-theirs

Example 03 · chat-message-theirs

Theirs

The assistant's reply: variant theirs, on the left as bare text with no bubble.

pnpm dlx shadcn add @01orbital/chat-message-theirs
npx shadcn add @01orbital/chat-message-theirs
yarn shadcn add @01orbital/chat-message-theirs
bunx --bun shadcn add @01orbital/chat-message-theirs

The source comes with full access.

One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.

04

chat-message-thread

Example 04 · chat-message-thread

Thread

A four-turn conversation built from Chat Message: the person's turns in bubbles on the right, the assistant's replies as bare text on the left.

pnpm dlx shadcn add @01orbital/chat-message-thread
npx shadcn add @01orbital/chat-message-thread
yarn shadcn add @01orbital/chat-message-thread
bunx --bun shadcn add @01orbital/chat-message-thread

The source comes with full access.

One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.

05

chat-message-with-code

Example 05 · chat-message-with-code

With Code

A question and an answer that carries code: Chat Message for the two paragraphs and Chat Code Block for the snippet between them.

pnpm dlx shadcn add @01orbital/chat-message-with-code
npx shadcn add @01orbital/chat-message-with-code
yarn shadcn add @01orbital/chat-message-with-code
bunx --bun shadcn add @01orbital/chat-message-with-code

The source comes with full access.

One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.

06

chat-message-long-reply

Example 06 · chat-message-long-reply

Long Reply

A long assistant reply in Chat Message, its paragraphs and numbered list kept as written.

pnpm dlx shadcn add @01orbital/chat-message-long-reply
npx shadcn add @01orbital/chat-message-long-reply
yarn shadcn add @01orbital/chat-message-long-reply
bunx --bun shadcn add @01orbital/chat-message-long-reply

The source comes with full access.

One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.

API reference

Prop

Type

It also accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.

Dependencies

npm: cn. The CLI installs them for you.

Registry pieces it installs with it:

  • bubble
  • message