iMessage UIv0.1.0

Documentation

Pixel-accurate iMessage UI for React

imessage-ui is the component kit behind this site's group-chat simulator, homepage message board and intake bot. Its flagship, IMessageGlass, renders the whole iOS 26 Messages surface — calibrated pixel-for-pixel against a real iPhone, with engine-glass chrome that refracts the thread and full group-chat support. Around it: 15 components — tailed bubbles with the SwiftUI-accurate curl, grouping, tapbacks, typing indicators, headers — plus the hooks that make a chat feel native (keyboard tracking, long-press gestures). Framework-agnostic React: no Next.js dependency, ESM, typed.

Installation

imessage-ui is a private, proprietary package (not on npm). It installs from a packed tarball — built with npm pack from the workspace — as pre-compiled ESM that works in Next, Vite, anything React 18+; no transpilePackages needed.

npm install ./imessage-ui-0.3.0.tgz react react-dom

Import the stylesheet once (it carries the global bubble primitives and the component styles), then compose:

// app/layout.tsx (or your entry point)
import "imessage-ui/styles.css";
import { IMessageScreen, ChatBubble } from "imessage-ui";

export function Hello() {
  return (
    <IMessageScreen>
      <ChatBubble variant="received" text="hey 👋" senderName="Riley" />
      <ChatBubble variant="sent" text="oh hey" receipt="read" />
    </IMessageScreen>
  );
}

Monorepo / source mode

Consuming the package from source (as this site does)? Add it to transpilePackages and import "imessage-ui/css"— the global layer only; component styles load through CSS modules. The published tarball's combined stylesheet is "imessage-ui/styles.css".

Theming

Every color flows through --imsg-* custom properties established by IMessageScreen (or IMessageThread). Tokens default to the light palette and flip automatically under a .dark ancestor — so the kit follows your existing dark-mode setup. Override any token with plain CSS to re-skin.

TokenControls
--imsg-textMessage text color
--imsg-bubbleReceived-bubble fill
--imsg-blueSent-bubble fill (iMessage blue)
--imsg-nameSender-name label color
--imsg-screen-bgChat backdrop
--imsg-dividerHairline dividers
--imsg-input-bg / --imsg-input-borderComposer pill

For the iOS 26 look, pass variant="glass" (plus a wallpaper) to Screen or Thread — bubbles and chrome turn translucent and frost whatever sits behind them.

Components

Also available: a portable vanilla-JS port of the kit, bundled with this portfolio's export.