HTML-in-Canvas is stable in Chrome 157. Little code, mostly where to use it, with public demos and a video in the post and a look at how the studio hero uses it.
HTML-in-Canvas is a stable feature in Chrome 157. The Chrome developer blog announced the stable release on October 26. In one line, it lets you draw real HTML (inputs, buttons, text) inside a <canvas>. After it is drawn, the element can still be clicked, still takes typing and stays in the accessibility tree.
Until now, putting UI in a canvas meant drawing the inputs and text by hand, or turning HTML into one flat image. A flat UI did not respond to clicks and screen readers could not read it. This feature fixes both.
You only need this much of the technique.
Put content="drawable" on the canvas and drawable on the element, then draw it with drawElementImage(). In 2D the element's position and pixels stay in sync on their own. In WebGL and WebGPU you tell the browser the position yourself with updateElementGeometry(). The rest is in the demos and the tips below.
An overview video introduced in Chrome's official post. Nothing connects to YouTube until you press play.
The community demos come from the list the Chrome team keeps. The four screens below were captured by opening them in Chrome 156 with the feature flag on.
More demos you can open yourself. The ones with motion need Chrome 157 or later.
- Demo siteCompiz Web (opens in a new tab)Shader transitions between web pages (Max Leiter)
- Demo siteCurved Markup (opens in a new tab)Selectable text on a curved screen (Jake Archibald)
- Demo siteHTML cloth (opens in a new tab)Form fields on a hanging cloth in a game (Thomas Richter-Trummer)
- Post on XDuck Hunt TODO (opens in a new tab)A form turned into a shooting target (Wes Bos)
- Post on XWobble Buttons (opens in a new tab)Buttons that wobble when pressed (Wes Bos)
- Case studyQuest Signal (opens in a new tab)DOM panels as 3D textures in a Godot scene (Vav Labs)
The official post and the demos group the uses into six. If you already use a canvas or 3D, these are the first candidates.
Six places to use it
| Shader effects on UI | Draw the real UI, then add glass, ripples or transitions | Liquid DOM, Compiz Web, Jelly slider |
| Menus inside 3D and games | Keep a terminal, a book or a form in a 3D scene as real DOM | HTML cloth, Quest Signal |
| Chart labels | Lay out multi-line labels and legends in HTML and put them on the chart | WICG pie chart |
| Image and video export | Export HTML-styled text with shader effects as an image or video stream | The media editing case in the official post |
| Text on shapes | Keep text selectable and readable on a curved or warped surface | Curved Markup |
| Accessible canvas apps | Keep a canvas app's buttons and inputs as DOM instead of rebuilding them | The large canvas app case in the official post |
Three.js (THREE.HTMLTexture, experimental), PlayCanvas, PixiJS (built in since v8.19.0) and Babylon.js have added support, and CanvasUI is an open-source component set. Google does not maintain these libraries.
1. Detect it and keep a fallback. Support today means Chrome 157 or later. The detection in the official docs sets content="drawable" on a canvas and checks that the value reads back. When it is missing, the docs suggest an alternative UI, floating HTML or a library such as html2canvas.
2. Without support, what is inside the canvas does not show. This is something we checked ourselves. Elements placed inside a canvas are not displayed in a browser without the feature. We had to write a separate path that shows the same card outside the canvas.
3. Ask for a repaint every frame to animate. When the DOM changes, the canvas fires a paint event. For animation without DOM changes, call requestPaint() each frame. DOM changes made inside paint appear in the next frame.
4. Keep size and position in step. Size the canvas to the screen's real pixels (with a ResizeObserver) and change its size only when needed, because that clears the canvas. In WebGL and WebGPU, report an element's position every time it moves, or taps land where it used to be.
5. Hide it when decorative, keep it when it is a control. Drawn content stays in the accessibility tree like normal DOM. If it is decoration, hide it with aria-hidden and inert. If people must operate it, leave it as it is.
6. Trust what the browser protects, and know the limits. According to the WICG explainer, things that could leak, such as visited links, cross-origin content and spelling markers, are not drawn. The official post also says browser extensions can act on the drawn content, for example by changing text.
The hero on our company page draws the logo like a scribble and then introduces dsui components one by one on a canvas. Until now the cards for the button, switch, slider and others were drawn one canvas command at a time. So when a component's look changed, the hero's picture had to be fixed separately.
Now, in browsers that support the feature, six cards (Button, Switch, Slider, Tabs, Input and Chip) are drawn as real components. Without support, the old hand-drawn cards are used. The detection and the drawing live in one file, and if a draw is not possible, only that frame falls back to the hand-drawn card.
Some things are still unchecked. We have not opened it in the stable Chrome 157 or on mobile, and we have not captured how the Tabs, Input and Chip cards look. The components inside the canvas are decoration, so they cannot be pressed.
HTML-in-Canvas fits first in screens that already use a canvas: games, 3D scenes, shader effects and editors, where you need real inputs and text that still move on top of an image. Bringing in a canvas only to add effects to ordinary web cards and buttons is still early.
The official post does not say how other browsers stand, so if you use it now, write the fallback first. Core features should work the same without it, and this should be a layer on top. Starting with decoration that the screen can do without, as in our hero, keeps the risk small.
The explanation follows the Chrome official blog and docs and the WICG explainer. We opened the demos in Chrome 156 with the feature flag on, and two that need motion (Compiz Web and Curved Markup) showed no picture in this setup, so they are not pictured. For Wes Bos's posts on X and the Quest Signal case, we only carried over what the Chrome team's list says and did not open them. We could not confirm other browsers' support because the official post does not state it.
- HTML-in-Canvas in Chrome 157 (Chrome for Developers, October 26, 2026)
- HTML-in-Canvas docs and concepts
- WICG html-in-canvas explainer and examples
- Community demo list
