grasscnGitHub

Bubble

Conversation bubbles distributed with the Message item.

Preview

<Alex> Ready to explore?
<Assistant> Bring your pickaxe.
Loading example...
To run this copied example, install these items using the linked CLI or manual instructions:

Usage

Install message, then import Bubble parts from components/ui/bubble. from="user" and from="assistant" derive Player and Assistant authors unless author is supplied. Scalar Content prefixes that author automatically.

Composition

BubbleGroup and Bubble inherit MessageScale, defaulting to 2. Bubble supports align start/end and the default backdrop variant only. BubbleReactions defaults to bottom/end and accepts actual interactive children. The example toggles a real reaction button state.

Interaction and limits

System bubbles use yellow text. Bubble grouping and reaction placement are web compositions over chat rendering; no separate vanilla bubble widget or independent installation item is claimed. Related Message and Message Scroller pages share the same complete installation payload.

See Message for the shared chat foreground and Message Scroller for bounded history.

Installation

This page shares the message installation identity; choose its own implementation file below. There is no separate registry item for this part.

Loading registry address

Component source

This is the component implementation. Its supporting styles, helpers and resources are also required. See complete manual installation.

Component implementationcomponents/ui/bubble.tsx · tsx
"use client";

import * as React from "react";

import { MessageScale, MessageAuthor, isChatInline } from "./message";

import "./minecraft-bubble.css";
import { MinecraftChatText } from "./minecraft-chat-text";
import { disclosureAdvance } from "./minecraft-disclosure-metrics";
import { minecraftGlyphs } from "./minecraft-font";
import {
  isMinecraftTextContent,

Interactive playground

<Alex> Ready to explore?
<Assistant> Bring your pickaxe.