Render a long Markdown message in a SwiftUI chat app without dropping frames while tokens stream in.
Replace SwiftUI Text with InlineText to get clickable links, inline images, and selection.
Render structured docs with headings, tables, code blocks, and blockquotes styled per block.
Plug a custom markup parser into the MarkupParser protocol for a non-Markdown format.
Apple platform development requires Xcode and the package is added via Swift Package Manager.
RemodexTextKit is a Swift library for showing rich, formatted text inside SwiftUI apps on Apple platforms. The README explains that it grew out of an AI coding app called Remodex, where the assistant streams long answers a few characters at a time, and the standard SwiftUI text view became too slow once messages got long. The package keeps a SwiftUI-friendly public interface but switches to UIKit under the hood for the expensive parts of live rendering, so that scrolling, selecting, and copying stay smooth while a model is still talking. The README frames the project as a spiritual successor to a popular open-source library called MarkdownUI, but redesigned around the idea of a general text rendering engine that happens to support Markdown rather than a Markdown-specific tool. The transformation flow turns markup into attributed content, resolves attachments asynchronously, applies styling through SwiftUI environment values, and uses SwiftUI's normal layout system to position everything on screen. There are three main views to use. InlineText is a drop-in replacement for SwiftUI's Text that supports inline formatting, links, images, and standard SwiftUI modifiers like font and foregroundStyle. StructuredText handles full documents with headings, paragraphs, lists, blockquotes, code blocks, and tables, each block styleable on its own. StreamingText is the path designed for live AI output: it takes the full response so far plus an optional latest delta, and a Boolean flag that flips to false when the response is finished. While streaming, it mutates a UIKit text view directly, coalesces token bursts, caches intrinsic-size measurements, and avoids rebuilding the SwiftUI view tree on every token. The README also lists features like native selection and copy, Markdown parsing through Foundation's AttributedString, inline attachments, math expressions as inline or block items, animated images in GIF, APNG, and WebP formats, syntax highlighting with custom themes, font-relative measurements that scale with accessibility settings, and a MarkupParser protocol so other markup formats can be plugged in. Installation is via Swift Package Manager and the project is on the Swift Package Index.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.