reportError (first-load entry)
@interlace/ui — `reportError` and `installGlobalHandlers` and nothing else, so the first page load stays small. Sends nothing unless you set a reporter.
Install
Two equivalent paths — the URL works in any shadcn-CLI setup; the alias works once you've registered @interlace in your components.json.
npx shadcn@latest add https://ds.interlace.tools/r/error-report-core.jsonnpx shadcn@latest add @interlace/error-report-coreHistory
This component is at v1.0.0, first shipped in @interlace/ui 2.4.0. The version is stamped as a banner into the file the install writes, so the copy in your tree says which one you have — compare it with the number above before deciding whether to re-run the install.
@interlace/ui 2.4.01 entry
- Addedminor
reportErrorno longer costs a page the whole error log. The small half (the report, the ring of recent reports, the flood rule,installGlobalHandlers) is its own entry,@interlace/ui/error-report-core, 992 B gzipped against 1,412 B before; listeners, restore,installErrorLog,formatReportsand the fallback copy stay in@interlace/ui/error-report-model, imported only where used.@interlace/ui/error-reportstill exports every name it did.createErrorLogis unchanged;extendErrorLogandcreateCoreLogare new. A test bundles the first-load path and fails above 1,000 B gzipped. No new dependency for consumers, no network call.
Import
5 named exports — pull the parts you need.
import { coreErrorLog, installGlobalHandlers, recentErrors, reportError, setReporter } from '@/lib/error-report-core';Accessibility
Every story for this component is rendered headlessly and checked with axe-core (wcag2aa, wcag22aa, best-practice, ACT) on every PR. That gate has no continue-on-error, so what ships has zero known violations.
What follows is what static analysis can see. Axe cannot press a key and never sees an overlay open, so the operable-without-a-mouse claim lives in Behavior instead, where the keyboard path is replayed step by step.
- Focus + keyboard behaviour
- Native element semantics — no interaction layer to get wrong.
- Focus ring (WCAG 2.2 SC 2.4.13)
- Not focusable — no focus indicator required.
- Reduced motion
- No animation to gate.
- ARIA in the source
- None — semantics come from the element or the Base UI primitive rather than hand-written ARIA.
Dependencies
- Base UI primitive
- Native / no Base UI dependency
- Lucide icons
- none
- NPM dependencies
- none
- Registry dependencies
Source
The full implementation — lib/error-report-core.ts once installed.
import {
DEFAULT_COALESCE_MS,
DEFAULT_LIMITS,
DEFAULT_MAX,
attachGlobalHandlers,
buildReport,
createCoreLog,
defaultMakeId,
type ErrorLogCore,
} from '@/lib/error-report-log-model';
// @interlace/error-report-core v1.0.0 — Interlace design system.
// Docs, props and live preview: https://ds.interlace.tools/c/error-report-core
// What changed since: https://ds.interlace.tools/c/error-report-core#history
// Generated banner — keep it, the upgrade diff reads this version.
/**
* @interlace/ui: `reportError`, the one function every caught failure goes through, and the
* little the first page load needs to make "nothing fails silently" true.
*
…45 more lines…Registry JSON
The raw registry record — what the shadcn CLI fetches.