Animating Diagrams with Grok by Asking for HTML Output
Melvin Vivas · X video post · 2026-10-17 · 0:19 · 4,343 views · Open on X
Topics: AI Dev Tools & Productivity, Prompt & Context Engineering · Level: beginner
Summary
This is a short, silent demo post. It shows that Grok, xAI's assistant (here the bot on X), can turn a diagram into an animated one if you ask it to write the animation in HTML. The lesson is a prompting trick: ask for HTML (with CSS/JS) output to get animated visuals.
Key points
- Grok can produce animated diagrams when you ask for them as HTML.
- Prompt pattern: describe the diagram, then tell it to 'use HTML and animate' it.
- The HTML it returns can be opened in a browser to view the animation.
- This is a quick way to make visual explanations of concepts, like architectures or flows, without design tools.
- The 19-second video has no narration, so it is only a demo of the result.
Resources mentioned
- Grok · tool · x.com · free
xAI's LLM chatbot; the creator runs a custom 'ML Grok Bot' on it to help debug and improve the pipeline.
Also in: Grok Bot Turns an X Post into a Shareable Dashboard (Melvin Vivas on X · notes), Demo: Grok Turns Your X Post Data into a Dashboard (Melvin Vivas on X · notes), Using a Custom Grok Bot Persona to Learn Arduino (Melvin Vivas on X · notes), Using a Grok Custom Bot Template as an Arduino Tutor (Melvin Vivas on X · notes) and 32 more
Try this
- Ask Grok to draw a diagram and tell it to use HTML and animate it.
- Open the HTML it generates in a browser to see the animation.
- Make animated HTML diagrams that explain AI concepts (e.g., a RAG pipeline or an agent loop) for your study notes or portfolio.
More in AI Dev Tools & Productivity
- First impressions: Claude Code in the cloud is good and fast
- Why Claude Code feels faster: gzipped turns and instant cloud sessions
- Tagging @bot on X to send instructions to Grok Bot
- Claude Code's Right Sidebar and Context Breakdown
- Telling Grok Bot to Remember Things
- First impressions of Claude Code cloud environments