Command Palette

Search for a command to run...

Docs
Fade Slide Tabs

Fade Slide Tabs

Tab component with fade and slide animations for smooth content transitions

Loading...

Installation

Usage

import FadeSlideTabs from "@/components/ruixen/fade-slide-tabs";
 
const tabItems = [
  {
    value: "overview",
    label: "Overview",
    content: "Overview content goes here.",
  },
  {
    value: "activity",
    label: "Activity",
    content: "Activity content goes here.",
  },
  {
    value: "settings",
    label: "Settings",
    content: "Settings content goes here.",
  },
  { value: "faq", label: "FAQ", content: "Frequently asked questions." },
];
 
export default function App() {
  return <FadeSlideTabs items={tabItems} defaultValue="overview" />;
}

Props

PropTypeDefaultDescription
itemsFadeSlideTabItem[]Default itemsArray of tab items
defaultValuestring"overview"Default active tab value
classNamestring""Additional CSS classes

Features

  • Fade Animation: Content fades in/out smoothly
  • Slide Effect: Content slides horizontally during transitions
  • Wait Mode: Uses AnimatePresence wait mode for clean transitions
  • Backdrop Blur: Glassmorphism effect on tab list

Types

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