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.
Draw shapes and experiment with globalCompositeOperation. See Porter‑Duff operators in action. Great for game devs.
Define the initial scroll position for a scroll container with scroll‑start. Test with and without snapping. New feature.
A beautiful full‑screen drawing canvas with variable brush sizes, colors, and an eraser. Export your sketch as PNG. All data stays local.
Move your mouse or finger to create colorful paint splatters on canvas. Great stress reliever. Download as PNG.
Help the bird fly through pipes without touching them. Click or tap to flap. Track your high score in localStorage. Classic time‑waster.
Render the classic Stanford Bunny with a basic WebGPU pipeline. Rotate and zoom. Check if your browser supports WebGPU.
Paste a URL and extract all meta tags, Open Graph, Twitter Cards, and JSON‑LD. View in a friendly table. Client‑side fetch.
Apply a Proxy to an object and see the get/set traps log fired in real time. Understand metaprogramming. Local.
Paste GeoJSON and instantly see it drawn on a draggable map. Supports points, lines, and polygons. Local fetch of tiles.
Adjust root, margin, and threshold. See a live log of intersection events as you scroll. Debug lazy loading.
Create a simple tessellation by deforming a square or triangle and repeating it across the canvas. Hypnotic patterns.
Divide pooled tips among staff based on hours worked or weighted percentages. Ensures fair distribution. Instant local calculation.
Create a custom soap recipe by selecting oils and their percentages. Get precise lye and water amounts. Safety warnings included.
Create complex linear gradients with any number of color stops, exact angles, and length units. Live preview and CSS code.
Style underlines, overlines, and strike-throughs with colors, wavy styles, and thickness. Modern CSS text‑decoration.
Design a fully styled scrollbar with colors, width, radius, and hover effects. Supports both ::-webkit‑scrollbar and Firefox scrollbar‑width.
Create CSS clamp() values for fluid typography. Enter min and max font sizes and viewport widths. Modern responsive design.
Create a realistic letterpress (debossed) text effect using CSS text‑shadow and background. Adjust depth and light direction. Copy code.
Create CSS mask‑image effects with custom shapes, gradients, and SVGs. Visually see the mask applied to an image. Copy the CSS.
Paste your CSS and sort the properties of each rule alphabetically or by concentric groups. Keep your stylesheets consistent without a build step.
Create a customizable checkerboard or grid background using pure CSS gradients. Adjust cell size and colors. Copy the code.
Upload two images and apply CSS blend modes (multiply, screen, overlay, etc.). See the result and copy the filter CSS. Pure frontend.
Add print styles like removing backgrounds, adding page breaks, setting margins. See print preview instantly.
Write a media query and instantly see if it matches your current viewport. Width, height, orientation, and more.
Paste your CSS and strip all `!important` declarations in one click. See a list of affected rules. Local tool.
Paste HTML/CSS snippets or enter properties to test how z‑index and stacking contexts interact. Real‑time example.
Adjust margin, border, padding, and content sizes interactively and see the rendered box model. Get the exact CSS. Teach or learn layout.
Design a pure CSS tooltip with custom text, position (top/bottom/left/right), and arrow. Copy the clean code.