rich-output

Solid

Write replies as rich HTML that the Walnut web console and iOS app render natively while streaming — colored callouts, comparison grids, SVG diagrams, CSS-only steppers/tabs, animations, and sandboxed `html-app` islands for real JavaScript. Load this when explaining something hard (a paper, a codebase, a protocol, a decision) where visual structure beats prose, or when a reply is in rich output mode.

Web & Frontend 32 stars 8 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
51
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Rich HTML output The Walnut web console and the iOS app both render raw HTML in an assistant reply as real DOM, streaming it like markdown. You do not need a special syntax or a wrapper: write `<div>`, `<style>`, `<svg>`, `<details>` in the reply and they render. Markdown still works alongside, so use HTML only where it earns its place. **Use it for**: comparisons, flows, step-by-step walkthroughs, anything with state or hierarchy, term highlighting, depth-on-demand. **Skip it for**: a short answer, a code diff, a list of three things. A wall of boxes is worse than a clean paragraph. ## The three rules that matter 1. **No inline `<script>`** — it is routed to a sandboxed iframe (see Islands) or dropped. Interactivity without JS: `<details>`, CSS `:checked` siblings, `:hover`, `@keyframes`. 2. **Your CSS is auto-scoped to your own message.** Every selector in a `<style>` block is rewritten to match only inside that reply, so plain class names (`.card`, `.row`) are safe and cannot restyle the app. `@keyframes` names are rewritten too. `@font-face`, `@property` and `@import` are dropped. 3. **The iOS app renders it too, one small web view per HTML run** — so your `<style>` reaches every run of the same reply, but prose between two cards stays native text (it is not styled), and `<img>` there loads only `data:`/`blob:` sources, so prefer inline `<svg>`. Inline markdown inside an HTML run works on both surfaces (bold, italic, `code`, links), but BLOCK markdown only works on ...

Details

Author
EvanZhang008
Repository
EvanZhang008/open-walnut
Created
6 months ago
Last Updated
4 days ago
Language
TypeScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

walnut-markdown-rendering

How Walnut turns model text into rendered output — the two marked instances and the CJK retunes registered on both, why we extend marked through its public API and never patch it, the rich-HTML block chunker's prefix invariant and blank-line content-model rule, DOMPurify policy per surface, and the marked 15 → 18 upgrade path. MUST read before changing anything in web/src/utils/markdown.ts, rich-blocks.ts, or adding a marked extension.

32 Updated 4 days ago
EvanZhang008
Web & Frontend Listed

html-effectiveness

Generate self-contained, interactive HTML documents instead of markdown walls of text. When output is complex (comparisons, timelines, multi-option decisions, data tables, code reviews, diagrams), produce a single .html file that renders spatially and interactively in the browser. Zero dependencies, zero build steps. Inspired by "The Unreasonable Effectiveness of HTML" (https://thariqs.github.io/html-effectiveness/). Use when: output would be long markdown, comparing options, presenting data, reviewing code, building plans, explaining concepts, or any multi-dimensional information. Trigger: "make it visual", "interactive output", "HTML instead of markdown", complex analysis results.

12 Updated 3 days ago
tincopper
AI & Automation Featured

visualize

Render a polished visual inline in the chat as part of your answer — a diagram, a chart, an interactive explainer, or a UI mockup. Load it proactively whenever an explanation would land better as a picture than as prose. Do not wait to be asked.

1,231 Updated today
vellum-ai