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·Components·Navigation

Morphing Tabs

Dynamic active rect geometry tracking with a floating spring indicator and roving focus keyboard navigation.

Target Environment
+
+
CLI Installation
React
$pnpm dlxexhumaaddmorphing-tabs--flavor=react
// 01·Workbench

Interactive Specification & Studio

navigation
Preset:
Viewport
Fluid 100%
Dashboard Metric Stream
Real-time system state with zero-jank floating indicator.
Parameters
4 Props
// 02·Usage

Quick Start & Consumer Example

Copy-paste ready implementation for React (.tsx). Automatically updates when you modify parameters in the Workbench above.

+
+
MorphingTabsDemo.tsx
React (.tsx)
import * as React from 'react';
import { MorphingTabs } from '@/components/ui/MorphingTabs';

export default function MorphingTabsDemo() {
  return (
    <div className="w-full max-w-2xl mx-auto p-6">
      <MorphingTabs.Root
        defaultValue="overview"
        springStiffness={26}
        variant="pill"
        size="md"
      >
        <MorphingTabs.List>
          <MorphingTabs.Indicator />
          <MorphingTabs.Trigger value="overview">Overview</MorphingTabs.Trigger>
          <MorphingTabs.Trigger value="analytics">Analytics</MorphingTabs.Trigger>
          <MorphingTabs.Trigger value="reports">Reports</MorphingTabs.Trigger>
          <MorphingTabs.Trigger value="settings">Settings</MorphingTabs.Trigger>
        </MorphingTabs.List>

        <MorphingTabs.Content value="overview" className="rounded-2xl border border-neutral-200/80 bg-white/50 p-6 backdrop-blur-sm dark:border-neutral-800/80 dark:bg-neutral-900/50">
          <h3 className="text-base font-semibold text-neutral-900 dark:text-white">Executive Overview</h3>
          <p className="mt-1 text-sm text-neutral-500 dark:text-neutral-400">High-level KPIs, operational status, and real-time throughput metrics.</p>
        </MorphingTabs.Content>

        <MorphingTabs.Content value="analytics" className="rounded-2xl border border-neutral-200/80 bg-white/50 p-6 backdrop-blur-sm dark:border-neutral-800/80 dark:bg-neutral-900/50">
          <h3 className="text-base font-semibold text-neutral-900 dark:text-white">System Analytics</h3>
          <p className="mt-1 text-sm text-neutral-500 dark:text-neutral-400">P99 latency distribution, cache hit ratios, and edge worker health.</p>
        </MorphingTabs.Content>

        <MorphingTabs.Content value="reports" className="rounded-2xl border border-neutral-200/80 bg-white/50 p-6 backdrop-blur-sm dark:border-neutral-800/80 dark:bg-neutral-900/50">
          <h3 className="text-base font-semibold text-neutral-900 dark:text-white">Compliance Reports</h3>
          <p className="mt-1 text-sm text-neutral-500 dark:text-neutral-400">Automated ISO 27001 audit trails and SOC 2 export logs.</p>
        </MorphingTabs.Content>

        <MorphingTabs.Content value="settings" className="rounded-2xl border border-neutral-200/80 bg-white/50 p-6 backdrop-blur-sm dark:border-neutral-800/80 dark:bg-neutral-900/50">
          <h3 className="text-base font-semibold text-neutral-900 dark:text-white">Workspace Settings</h3>
          <p className="mt-1 text-sm text-neutral-500 dark:text-neutral-400">API credentials, notification hooks, and team RBAC permissions.</p>
        </MorphingTabs.Content>
      </MorphingTabs.Root>
    </div>
  );
}
// 03·API Contract

Props & Configuration

Exhaustive parameter contract for Morphing Tabs. Validated in the live Studio workbench above and statically checked across all 13 ecosystem templates.

PropTypeDefaultDescription
springStiffness
number26Natural angular frequency (omega) of the critically damped spring ODE.
variant
selectpillVisual style and geometry of the kinetic morphing indicator.
size
selectmdPadding and typographic scale of tab trigger buttons.
liquidStretch
booleanfalseVolume-preserving liquid pill stretch during transitions.
springStiffness
number

Natural angular frequency (omega) of the critically damped spring ODE.

Default:26
variant
select

Visual style and geometry of the kinetic morphing indicator.

Default:pill
size
select

Padding and typographic scale of tab trigger buttons.

Default:md
liquidStretch
boolean

Volume-preserving liquid pill stretch during transitions.

Default:false
// 04·Source Code

Component Source

Component source definition for React (.tsx). Toggle between the clean wrapper and the standalone ejected engine micro-kernel.

+
+
MorphingTabs.tsx
import * as React from 'react';
import {
  TabsRoot as CoreTabsRoot,
  TabsList as CoreTabsList,
  TabsIndicator as CoreTabsIndicator,
  TabsTrigger as CoreTabsTrigger,
  TabsContent as CoreTabsContent,
  type TabsRootProps as CoreTabsRootProps,
  type TabsListProps as CoreTabsListProps,
  type TabsIndicatorProps as CoreTabsIndicatorProps,
  type TabsTriggerProps as CoreTabsTriggerProps,
  type TabsContentProps as CoreTabsContentProps,
} from '@exhuma/core';
import { clsx } from 'clsx';

export interface TabsRootProps extends CoreTabsRootProps {
  className?: string;
}

export const TabsRoot = React.forwardRef<HTMLDivElement, TabsRootProps>(
  ({ className, springStiffness = 26, variant = 'pill', size = 'md', ...props }, _ref) => (
    <CoreTabsRoot
      className={clsx('flex flex-col', className)}
      springStiffness={springStiffness}
      variant={variant as 'pill' | 'underline' | 'glow'}
      size={size as 'sm' | 'md' | 'lg'}
      {...props}
    />
  )
);
TabsRoot.displayName = 'TabsRoot';

export interface TabsListProps extends CoreTabsListProps {
  className?: string;
}

export const TabsList = React.forwardRef<HTMLDivElement, TabsListProps>(
  ({ className, ...props }, _ref) => (
    <CoreTabsList
      className={clsx(className)}
      {...props}
    />
  )
);
TabsList.displayName = 'TabsList';

export interface TabsIndicatorProps extends CoreTabsIndicatorProps {
  className?: string;
}

export const TabsIndicator = React.forwardRef<HTMLDivElement, TabsIndicatorProps>(
  ({ className, ...props }, _ref) => (
    <CoreTabsIndicator
      className={clsx(className)}
      {...props}
    />
  )
);
TabsIndicator.displayName = 'TabsIndicator';

export interface TabsTriggerProps extends CoreTabsTriggerProps {
  className?: string;
}

export const TabsTrigger = React.forwardRef<HTMLButtonElement, TabsTriggerProps>(
  ({ className, ...props }, _ref) => (
    <CoreTabsTrigger
      className={clsx(className)}
      {...props}
    />
  )
);
TabsTrigger.displayName = 'TabsTrigger';

export interface TabsContentProps extends CoreTabsContentProps {
  className?: string;
}

export const TabsContent = React.forwardRef<HTMLDivElement, TabsContentProps>(
  ({ className, ...props }, _ref) => (
    <CoreTabsContent
      className={clsx('mt-4 focus-visible:outline-none', className)}
      {...props}
    />
  )
);
TabsContent.displayName = 'TabsContent';

export const MorphingTabs = {
  Root: TabsRoot,
  List: TabsList,
  Indicator: TabsIndicator,
  Trigger: TabsTrigger,
  Content: TabsContent,
};

export default MorphingTabs;
// 05·Architecture

Lifecycle Safety & Performance

Engineered for high-frequency user interactions with zero memory leaks.

Teardown

Deterministic Cleanup

All pointer event listeners, scroll handlers, and resize observers are cleanly destroyed on component unmount, preventing lingering background processes.
Compositor

GPU Compositor Acceleration

Transform and opacity modifications run directly on the GPU compositor thread using will-change: transform without triggering browser layout recalculations.
// 06·a11y

Accessibility Considerations

Fully compliant with WCAG guidelines and respects user motion preferences.

Motion

prefers-reduced-motion Support

When a user has prefers-reduced-motion: reduce enabled in their operating system, Exhuma components automatically disable 3D gyroscope tilt and spring animations, rendering static accessible content.
Diamond GridFloating Dock