Resize Observer Playground - Online Watch Element Size
Drag to resize a box and see the Resize Observer callback fire. Get contentRect and borderBoxSize. Learn the API.
UD5 Toolkit
Real-time monitoring of element size changes using ResizeObserver API
Drag the bottom-right corner to resize, or use the sliders below. Use the sliders below to adjust element size.
window.resize event (which only fires when the entire viewport resizes), ResizeObserver can track size changes on any individual element—even those caused by CSS changes, dynamic content loading, or JavaScript manipulation. It's widely supported in all modern browsers (Chrome 64+, Firefox 69+, Safari 13.1+, Edge 79+).
window.resize only fires when the entire browser viewport changes size. In contrast, ResizeObserver watches individual DOM elements and detects size changes caused by any reason: CSS media queries, flex/grid layout recalculations, content insertion/removal, JavaScript DOM manipulation, or even CSS animations. This granularity makes it ideal for responsive components and dynamic layouts.
setInterval to check dimensions), ResizeObserver uses a callback-based model that fires only when actual size changes occur. The callbacks are batched and delivered in the same microtask, minimizing layout thrashing. For most use cases, the performance impact is negligible. However, avoid performing heavy synchronous work inside the callback—use requestAnimationFrame if you need to defer expensive operations.
observer.unobserve(element) to stop watching a specific element, or observer.disconnect() to stop observing all elements and release the observer entirely. It's good practice to call disconnect() when the observed element is removed from the DOM or when your component unmounts, to prevent memory leaks.
entry.contentRect.width and entry.contentRect.height are sufficient and have the broadest browser support.
Drag to resize a box and see the Resize Observer callback fire. Get contentRect and borderBoxSize. Learn the API.
Make an element resizable horizontally, vertically, or both. See the handle and code. Useful for textareas.
Enter a hook size in any system and instantly see the equivalent in all other standards.
Estimate the worm bin surface area needed based on the amount of kitchen scraps your household produces weekly. Right‑size your worm farm.
Enter material thickness and get the recommended pop rivet diameter and grip range.
Select shoe size and riding style to get recommended deck width. Visual comparison.
Enter your bird species and weight to find the correct harness size. Visual adjustment guide.
Enter the dimensions of your insert and get the correct envelope size (DL, C6, etc.). Quick mail guide.
Look up front and rear wiper blade sizes by car model. Never buy the wrong length again.
Enter head circumference to get crown diameter and length. Perfect fit top‑down hats.
Enter piece count and piece size to estimate finished dimensions. Check if it fits your table.
Reference for standard blanket and afghan sizes in inches and cm. Perfect for knitters and crocheters.
Enter a URL and click to check if it's reachable from your browser (CORS-limited, uses no-cors fetch). Quick manual test. Local only.
Enter your bag dimensions and compare against major airline carry-on and checked limits. Visual pass/fail gauge. Avoid gate fees.
Convert running shoe sizes between US (men/women), UK, EU, and centimeters. Also includes brand-specific fit notes (general guide).
Enter baby's weight in lbs or kg to see suggested diaper sizes across major brands. General reference, no data collected.
See your current push subscription details. Trigger push and notificationclick events manually to debug.
Shrink a PDF file size with configurable image quality and object removal. All processing stays in your browser.
Watch for updates to aria‑live regions and log what a screen reader would announce. Debug live regions.
Fill in a form and see the FormData object as JSON. Perfect for debugging multipart form submissions. Client-side.
Connect a MIDI controller and see every message in a log. Filter by channel and type. Essential for debugging music apps.
Request permission and detect when the user is idle (away from keyboard). See screen lock state. For native‑like apps.
Touch the screen and see the exact coordinates, radius, and force of each touch point. Indispensable for mobile web devs.
See the current state of a Service Worker for your page: installing, waiting, active. Unregister or skip waiting. Developer utility.
Predict the file size of an image based on pixel dimensions and format (JPEG, PNG, WebP). Rough estimate. Local.
Enter two tire sizes and see a side‑by‑side comparison of diameter, width, and speedometer error. Local math.
Paste a list of JavaScript values and see them pretty‑printed as if in the browser console. Great for debugging.
Press any key and see the full KeyboardEvent object: key, code, keyCode, modifier status. Dev tool.
Paste HTML/CSS snippets or enter properties to test how z‑index and stacking contexts interact. Real‑time example.
Reduce your HTML file size by stripping whitespace, comments, and optional closing tags. Secure browser‑based.