CSS Paint Worklet Live Editor - Online Houdini Sandbox
Write a paint worklet in JavaScript and see it used as a CSS background instantly. Experiment with Houdini. Local.
UD5 Toolkit
CSS Paint Worklet is part of the CSS Houdini API suite. It lets developers programmatically generate images via JavaScript that can be used anywhere CSS expects an image â like background-image, border-image, or mask-image. The rendering happens on a separate worklet thread for performance.
As of 2024, Paint Worklet is supported in Chromium-based browsers (Chrome, Edge, Opera, Brave) and Safari 16.4+. Firefox has not yet implemented it. Check CSS.paintWorklet in your console to verify support.
1. Create a JS file with registerPaint('myPainter', class { ... }). 2. Load it via CSS.paintWorklet.addModule('path/to/worklet.js'). 3. Reference it in CSS: background-image: paint(myPainter). The worklet runs on a separate thread.
Yes! Use CSS custom properties. Declare them in the static get inputProperties() method, then read them in paint() via properties.get('--my-var'). Set values in your CSS: --my-var: 20px; on the element.
Paint Worklets run on a dedicated worklet thread, not the main thread. This means complex background patterns won't block UI responsiveness. The browser also caches the output when input properties remain unchanged.
Unlike Canvas (which requires JavaScript DOM manipulation), Paint Worklets integrate directly into CSS and respond to element size changes automatically. Compared to inline SVG, they can be more dynamic and don't add DOM nodes. They also support CSS custom property reactivity.
inputProperties and inputArguments?inputProperties lets you declare which CSS custom properties the worklet should listen to â changes trigger a repaint. inputArguments allows passing values directly from CSS, like paint(myPainter, 20px, red), though browser support for arguments is more limited.
Yes! Since the worklet responds to CSS custom property changes, you can animate those properties using CSS transitions, @keyframes, or JavaScript. However, the animation runs at the element's repaint rate â for 60fps animations, test performance carefully.
Write a paint worklet in JavaScript and see it used as a CSS background instantly. Experiment with Houdini. Local.
Add many complex CSS styles and measure frames per second. Isolate expensive properties. Practical performance lab.
Move your mouse or finger to create colorful paint splatters on canvas. Great stress reliever. Download as PNG.
Create CSS maskâimage effects with custom shapes, gradients, and SVGs. Visually see the mask applied to an image. Copy the CSS.
Draw shapes and experiment with globalCompositeOperation. See PorterâDuff operators in action. Great for game devs.
Enter the amount of leftover paint and see how many square feet it still covers. Plan touch-ups.
A fullâscreen drawing canvas supporting multiple touch points simultaneously. Different colors per finger. Works on mobile.
Limit browser gestures on an element: panâx, pinchâzoom, manipulation. Draw on a canvas to test. Mobile dev helper.
Create a custom element with named slots and see content projection in action. Learn Web Components basics.
Use CSS masks and fixed backgrounds to create a unique parallax reveal effect. Copy the code. No JavaScript.
Create an animation that advances with scroll using animationâtimeline: scroll(). See the visual timeline editor. Modern CSS.
A beautiful fullâscreen drawing canvas with variable brush sizes, colors, and an eraser. Export your sketch as PNG. All data stays local.
Visually create the glassmorphism effect: background blur, transparency, and border. Copy the complete CSS. Modern UI design.
Define the initial scroll position for a scroll container with scrollâstart. Test with and without snapping. New feature.
Toggle contentâvisibility: auto on long blocks and see the rendering time difference. Understand this powerful property.
Upload a small image and see it tiled as a canvas pattern. Export the pattern or copy the JavaScript.
Write JavaScript using element.animate() and see the result in a live preview. Compare with CSS keyframes. Debugger included.
Apply contentâvisibility: auto to offâscreen sections and see the rendering cost drop. Demos for infinite scroll optimization.
See how overflow: visible, hidden, scroll, and auto behave with real content. Clone to test with your text.
Create a pure CSS scroll progress indicator using animationâtimeline: scroll(). No JavaScript. Copy the complete code.
Customize falling snow particles with pure CSS or canvas. Adjust speed, size, and wind. Copy the code for your website.
Generate a complete <head> section with meta charset, viewport, SEO, favicon, and social tags. Customize and copy.
Calculate how much thinner to add to achieve the right viscosity for spray guns. Common ratios.
Enter nozzle type and surface area to get optimal spray distance, sweep speed, and estimated cans needed. Prevent runs and drips.
See the View Transitions API in action. Crossâfade and morph between two states. Copy the JavaScript starter code.
Write Mermaid syntax inside Markdown blocks and instantly see rendered flowcharts, sequence diagrams, and Gantt charts. Copy SVG.
Write or paste HTML, CSS, and JavaScript and instantly see the rendered output in a sandboxed iframe. A handy frontend prototyping tool.
Draw a digit (0â9) on the canvas and a simple neural net guess the number. Educational demo. No upload.
Input room dimensions and number of coats to estimate how many gallons/litres of paint you need. Excludes doors/windows optionally. Local calculator.
Take a screenshot of the current browser tab using Screen Capture API. Crop, annotate with text and arrows, and download as PNG. Local only.