iMessage UIv0.1.0

Reference

Utilities

Small helpers the components are built on, exported because consumers keep needing them too.

Usage

import { isEmojiOnly, cn, buildBubblePath } from "imessage-ui";

API reference

isEmojiOnly

isEmojiOnly(text: string): boolean

True when the text is 1–3 emoji graphemes (skin tones and ZWJ sequences count as one) — the rule ChatBubble uses for big-emoji, bubble-less rendering. Uses Intl.Segmenter + Unicode property escapes.

cn

cn(...values: ClassValue[]): string

Minimal class joiner (no tailwind-merge) used across the kit. Handy when composing kit classes with your own.

buildBubblePath

buildBubblePath(w: number, h: number, r?: number): string

Documented with HeroBubble — the tailed-bubble SVG path builder.