Browser-based DOM layout linter. Drops into any page — dev mode, Playwright, bookmarklet, or userscript.
Drag to your bookmarks bar. Click on any page to run a one-off scan (loads npm latest via jsDelivr).
OverflowLintAuto-runs on every page via Greasemonkey / Tampermonkey / Violentmonkey. Self-updates from jsDelivr on npm release.
Install UserscriptInstall links track the latest published npm version. This site may document unreleased changes from main.
import { run } from 'overflowlint'
const result = run()
// { summary: { total: 3, error: 1, warning: 2, info: 0 }, findings: [...], truncated: false }
import { install } from 'overflowlint'
// Watches DOM mutations + resize, debounces, reports to console
const stop = install({ reportToConsole: true })
// Later, tear down:
stop()
<script type="module">
import { install } from 'https://cdn.jsdelivr.net/npm/overflowlint@0.1.2/+esm'
install()
</script>
import { test, expect } from '@playwright/test'
import { checkPage } from 'overflowlint/playwright'
test('no layout errors', async ({ page }) => {
await page.goto('https://example.com')
const { failures } = await checkPage(page)
expect(failures).toHaveLength(0)
})
| Attribute | Purpose |
|---|---|
data-ol-no-scroll | Assert no scroll overflow on this axis (values: x, y, both, none) |
data-ol-allow-scroll | Permit overflow on this axis (x, y, both) |
data-ol-in-viewport | Assert element is visible in the viewport |
data-ol-clickable | Mark a custom element as interactive for coverage/size checks |
data-ol-min-target | Minimum touch target size in px (default: 24) |
data-ol-name | Friendly name for selector output (like data-testid) |
data-ol-ignore | Skip this element and its children |
data-ol-no-truncate | Skip text truncation check on this element |
const result = run({
maxFindings: 100, // stop after N issues (default: 80)
tolerance: 2, // px tolerance for overflow checks (default: 1)
reportToConsole: false, // silence console output
})