Coming Soon: The Design & Development StudioVisit zarasana.com

Magnetic Tabs

A segmented control where the active background "pill" slides fluidly between items using framer-motion layout animations. The movement feels "magnetic"—snapping to the cursor or selection with spring physics.

Usage

Each tab variant is installed as a separate component to keep your bundle size small. Choose the style that matches your design system.

Neo-SaaS Style

Clean, minimal, and highly functional. Perfect for modern dashboards.

Installation

Legacy installation using the full registry URL:

pnpm dlx shadcn@latest add "https://ui.zarasana.com/r/magnetic-tabs-neo-saas.json"

Neo-Brutal Style

Bold, high-contrast, and solid. Uses hard shadows and vibrant colors.

Installation

Legacy installation using the full registry URL:

pnpm dlx shadcn@latest add "https://ui.zarasana.com/r/magnetic-tabs-neo-brutal.json"

Glassomorphic Style

Elegant, translucent, and glowing. Features frosted glass effects and subtle gradients.

Installation

Legacy installation using the full registry URL:

pnpm dlx shadcn@latest add "https://ui.zarasana.com/r/magnetic-tabs-glassomorphic.json"

/>

API Reference

Props

PropTypeDefaultDescription
itemsTabItem[]-Array of tab items. Each item has id, label, optional icon, and optional color (Neo-Brutal).
defaultValuestring-The initial active tab ID (uncontrolled mode).
valuestring-The active tab ID (controlled mode).
onValueChange(value: string) => void-Callback fired when a tab is selected.
classNamestring-Additional CSS classes for the container.

TabItem Interface

ts
interface TabItem {
  id: string;
  label: string;
  icon?: React.ElementType; // Lucide icon e.g.
  color?: string; // (Neo-Brutal only) Hex or Tailwind class for background
}

© 2026 Zarasana UI. All rights reserved.