Layout instability performance entriesLimited availability
A layout-shift performance entry measures the layout stability of web pages based on movements of the elements on the page. They're used to calculate cumulative layout shift (CLS), a common metric for perceived stability.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–83Not supported
84+Supportedsince Jul 27, 2020
Current: 155Edge
12–83Not supported
84+Supportedsince Jul 16, 2020
Current: 154Firefox
✕Not supportedup to 157
Current: 157Safari
✕Not supportedup to 27
Current: 27MobileChrome Android
18–83Not supported
84+Supportedsince Jul 27, 2020
Current: 155Firefox Android
✕Not supportedup to 157
Current: 157Safari iOS
✕Not supportedup to 27
Current: 27How to use
Not supported in Firefox, Safari, Firefox Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: LayoutShift.
Feature detection
JS · check before using
if ("LayoutShift" in globalThis) {
// LayoutShift is available
} else {
// load a polyfill or use a fallback
}Sub-features
Support for each part of the feature (11). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| LayoutShift | 77 | 79 | ✕ | ✕ | 77 | ✕ | ✕ |
| LayoutShift.hadRecentInput | 77 | 79 | ✕ | ✕ | 77 | ✕ | ✕ |
| LayoutShift.lastInputTime | 77 | 79 | ✕ | ✕ | 77 | ✕ | ✕ |
| LayoutShift.sources | 84 | 84 | ✕ | ✕ | 84 | ✕ | ✕ |
| LayoutShift.toJSON | 77 | 79 | ✕ | ✕ | 77 | ✕ | ✕ |
| LayoutShift.value | 77 | 79 | ✕ | ✕ | 77 | ✕ | ✕ |
| LayoutShiftAttribution | 84 | 84 | ✕ | ✕ | 84 | ✕ | ✕ |
| LayoutShiftAttribution.currentRect | 84 | 84 | ✕ | ✕ | 84 | ✕ | ✕ |
| LayoutShiftAttribution.node | 84 | 84 | ✕ | ✕ | 84 | ✕ | ✕ |
| LayoutShiftAttribution.previousRect | 84 | 84 | ✕ | ✕ | 84 | ✕ | ✕ |
| LayoutShiftAttribution.toJSON | 84 | 84 | ✕ | ✕ | 84 | ✕ | ✕ |