Command Palette

Search for a command to run...

Docs
Zoom Depth Tabs

Zoom Depth Tabs

A tab component with 3D zoom and depth effects for enhanced visual appeal

Loading...

Installation

Usage

import ZoomDepthTabs from "@/components/ruixen/zoom-depth-tabs";
 
const tabItems = [
  {
    value: "overview",
    label: "Overview",
    content: "Overview with rich info and stats.",
  },
  {
    value: "activity",
    label: "Activity",
    content: "Activity with graphs and timelines.",
  },
  {
    value: "settings",
    label: "Settings",
    content: "Settings with controls and toggles.",
  },
  {
    value: "faq",
    label: "FAQ",
    content: "Common questions and helpful answers.",
  },
];
 
export default function App() {
  return <ZoomDepthTabs items={tabItems} defaultValue="overview" />;
}

Props

PropTypeDefaultDescription
itemsDepthTabItem[]Default itemsArray of tab items
defaultValuestringFirst itemDefault active tab value
classNamestring""Additional CSS classes

Features

  • 3D Effects: Tabs have rotateX and rotateY transformations
  • Zoom Animation: Active tabs scale up with spring animations
  • Depth Perception: Uses perspective and transforms for 3D feel
  • Smooth Transitions: Spring-based animations for natural movement

Types

interface DepthTabItem {
  value: string;
  label: string;
  content?: React.ReactNode;
}