whatisgithub

What is message-ui?

pontusab/message-ui — explained in plain English

Analysis updated 2026-05-18

75TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

A React based library for designing chat message attachments as components and exporting them to PNG images to send through iMessage, WhatsApp, and similar channels.

Mindmap

mindmap
  root((Message UI))
    What it does
      Author attachments in React
      Local live preview
      Export to PNG
    Tech stack
      React
      TypeScript
      Satori and Resvg
    Use cases
      Chat bot attachments
      Rich agent replies
      Multi channel messaging
    Audience
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Design a rich order confirmation or receipt card as a React component and send it as an image through iMessage or WhatsApp.

USE CASE 2

Give a chat bot or AI agent the ability to send visual cards instead of only plain text replies.

USE CASE 3

Preview attachment templates locally with hot reload before wiring them into a chat backend.

USE CASE 4

Export charts, avatars, or activity rings as attachment images for a multi channel chat app.

What is it built with?

TypeScriptReactSatoriResvgTailwind

How does it compare?

pontusab/message-uiabeehive/annadoantfu/vite-dev-rpc
Stars757575
LanguageTypeScriptTypeScriptTypeScript
Last pushed2026-05-01
MaintenanceMaintained
Setup difficultyeasyeasymoderate
Complexity2/52/52/5
Audiencedevelopervibe coderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

Message UI is a library for building rich, image based attachments that chat bots and agents can send through channels like iMessage and WhatsApp, instead of being limited to plain text. The README describes it as similar in spirit to React Email, but for message attachments rather than email templates. The core idea is that you write an attachment as a normal React component, using building blocks like Attachment, Text, and Row that the library provides, styled with regular inline styles or an included Tailwind wrapper. You can preview these components locally in a browser with a command line tool that supports hot reload, so you see your changes as you save the file. When you are ready to actually send an attachment, you export the same React component to a PNG image using a rendering function, which you can then upload, attach to a message, or write to disk from a script, a server route, or a background job. Under the hood, the export step converts the React template to SVG and then to a PNG using Satori and Resvg, which is meant to produce sharp images with predictable output paths. The project is split into several packages: one holding the attachment component primitives like charts, avatars, dividers, and lists, one that handles the actual rendering to SVG or PNG, one for the Tailwind styling wrapper, one running the local preview server, and a command line interface that provides the dev and export commands. Message UI is meant to be used as the attachment layer alongside whatever chat runtime, backend, and delivery system a project already has, and the README mentions it pairs well with the Chat SDK framework for multi channel chat apps. Installation is done through npm, and the project is released under the MIT license.

Copy-paste prompts

Prompt 1
Help me build a Message UI attachment component that shows an order status card with a progress bar.
Prompt 2
Show me how to wire renderToPng from message-ui/render into a server route that sends WhatsApp messages.
Prompt 3
Explain how Message UI's export pipeline turns a React component into a PNG using Satori and Resvg.
Prompt 4
Help me set up message-ui dev to preview my attachment templates locally.

Frequently asked questions

What is message-ui?

A React based library for designing chat message attachments as components and exporting them to PNG images to send through iMessage, WhatsApp, and similar channels.

What language is message-ui written in?

Mainly TypeScript. The stack also includes TypeScript, React, Satori.

What license does message-ui use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is message-ui to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is message-ui for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.