Free & open source, built for every frontend stack. Star Exhuma on GitHub
ExhumaBeta
DocsComponentsBlog

Getting Started

  • Introduction
  • Installation
  • Theming & Dark Mode
  • CLI Reference

Architecture

  • Kinetic Methodology
  • Ecosystem Contracts
  • Lifecycle & Memory Safety

Components

  • All Components20
Cards8
  • Stacking Cards
  • Horizontal Scroller
  • Tilt Card
  • Spotlight Card
  • Border Beam
  • Card Swipe Stack
  • Comparison Slider
  • Expandable Card
Layouts6
  • CSS Masonry
  • Row Masonry
  • Auto Grid
  • Infinite Marquee
  • Bento Grid
  • Diamond Grid
Navigation2
  • Morphing Tabs
  • Floating Dock
Primitives4
  • Accordion
  • Number Ticker
  • Magnetic Button
  • Cursor Tooltip
// DOCS·Architecture

Lifecycle & Memory Safety

How Exhuma guarantees zero memory leaks, deterministic event listener teardowns, and observer unregistrations across all 13 supported frontend runtimes.

  • 0 leaked listeners
  • 0 heap slope
// 01·Guarantee

The Zero-Leak Guarantee

Interactive UI components that calculate spring physics, mouse trajectories, and horizontal scroll snaps continuously register event listeners on window, document, or parent containers. In long-running Single Page Applications, failure to unregister these listeners on component unmount causes runaway memory growth.

DOM

Detached DOM Prevention

Every listener holds an ephemeral reference. On unmount, all references are nulled to allow browser garbage collection immediately.
rAF

Animation Frame Cancellation

Active requestAnimationFrame loops are cleanly canceled via cancelAnimationFrame before component destruction.
Guarantee
Invariant Specification
A component passes Exhuma certification only if 1,000 rapid route transitions produce exactly 0 leaked listeners and zero memory slope on Chrome V8 heap profiler.
// 02·Listeners

Deterministic Listener Teardown

In React and Next.js, teardowns are anchored in the return callback of useEffect with strict AbortController or removeEventListener pairing:

React / Next.js Teardown
ts
useEffect(() => {
  const handlePointerMove = (e: MouseEvent) => {
    // 60 FPS transform calculation
  };

  window.addEventListener('mousemove', handlePointerMove, { passive: true });

  // Mandatory Teardown:
  return () => {
    window.removeEventListener('mousemove', handlePointerMove);
  };
}, [maxTilt]);
// 03·Observers

ResizeObserver Disconnection

Components like CSS Masonry and Auto-Fit Grid monitor container width changes to dynamically recalculate column tracks. We guarantee immediate disconnection:

observer-cleanup.ts
ts
const observer = new ResizeObserver((entries) => {
  for (const entry of entries) {
    updateColumnCount(entry.contentRect.width);
  }
});

observer.observe(containerRef.current);

// Teardown:
return () => observer.disconnect();
// 04·Matrix

Framework Teardown Matrix

How each target framework contract implements lifecycle safety:

FrameworkLifecycle Cleanup HookObserver Disposal
React 18 / 19useEffect() return () => {}disconnect()
Next.js 15useEffect() return () => {}disconnect()
Vue 3 / NuxtonUnmounted(() => {})disconnect()
Svelte 5$effect(() => { return () => {} })disconnect()
Angular 18+DestroyRef.onDestroy(() => {})disconnect()
SolidJSonCleanup(() => {})disconnect()
AstrodisconnectedCallback()disconnect()
Vanilla JSdestroy() instance methoddisconnect()
Flutter@override void dispose()_controller.dispose()
Ecosystem ContractsAll Components
On This Page
The Zero-Leak GuaranteeDeterministic Listener TeardownResizeObserver DisconnectionFramework Teardown Matrix