Magnified Tab
magnified-tab is a macOS-dock-style tab bar component. Each app icon in a bottom dock grows smoothly under the cursor and a tooltip shows its name, while clicking an icon swaps the large preview image above with a directional slide-and-fade animation.
Installation
Usage
import MagnifiedDocOneFile from '@/components/tabs/magnified-tabs'; export default function Page() { return <MagnifiedDocOneFile />; }- Showcasing a set of apps, products, or screenshots as a switchable gallery with a dock-like navigation bar
- Hero or feature sections that need a playful macOS-style magnification effect for image tabs
- Portfolio or landing pages where each tab reveals a large preview image with a short label
- Replacing a plain horizontal tab strip when a more visual, interactive navigation is desired
Examples
Basic usage in a page section
Render the default export inside a section. The tab items come from the apps constant imported by the source file, so configure that data source before rendering.
import MagnifiedDocOneFile from '@/components/tabs/magnified-tabs'; export default function FeatureSection() { return <section className='py-16'><MagnifiedDocOneFile /></section>; }Inside a centered hero container
The component sizes itself with w-4/5 and mx-auto, so wrap it in a container to control the surrounding layout and vertical spacing.
import MagnifiedDocOneFile from '@/components/tabs/magnified-tabs'; export default function Hero() { return <div className='mx-auto max-w-6xl px-4 py-24 text-center'><h2 className='mb-10 text-3xl font-bold'>Explore our apps</h2><MagnifiedDocOneFile /></div>; }Reusing the tooltip primitives from magnified-doc
The tooltip components installed with this item can be used on their own. TooltipContent applies the same frosted styling and accepts className and sideOffset.
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/magnified-doc'; export function HintButton() { return <TooltipProvider delayDuration={0}><Tooltip><TooltipTrigger className='rounded-md border px-3 py-1 text-sm'>Hover me</TooltipTrigger><TooltipContent sideOffset={8}><p className='text-xs'>A short hint</p></TooltipContent></Tooltip></TooltipProvider>; }API reference
Accessibility
- Each dock trigger contains a visually hidden span with the app name (sr-only), so screen readers announce the tab label.
- The dock items are Radix TooltipTrigger elements, which render as buttons and are keyboard focusable. The tooltip opens on focus as well as hover.
- The source overrides the image alt text in the dock icons to 'App' because the forwarded alt prop is replaced, so the icons are not descriptive. Consider editing the source so each icon has a meaningful alt, or rely on the sr-only label.
- The active tab is conveyed only visually. The buttons do not set aria-selected or aria-current, so consider adding them if the component is used as a tablist.
- Magnification and slide animations run regardless of prefers-reduced-motion. Consider disabling the spring and transition effects for users who request reduced motion.
- The magnification effect depends on mouse position (onMouseMove), so keyboard users do not get the enlargement effect. Tooltips still appear on keyboard focus.
Docs written by anthropic:claude-haiku-5-5 from the registry source.
Use with Coding Agent
Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.
Use the "Magnified Tab" component (ui-layouts/magnified-tab) from its shadcn registry.1. Install it with: npx shadcn@latest add https://ui-layouts.com/r/magnified-tab.json2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: MagnifiedDocOneFile, TooltipContent.sideOffset, TooltipContent.className.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport MagnifiedDocOneFile from '@/components/tabs/magnified-tabs'; export default function Page() { return <MagnifiedDocOneFile />; }```Files & dependencies
- ./registry/components/tabs/magnified-tabs.tsx
- ./components/ui/magnified-doc.tsx
Looks similar, elsewhere
There is no screenshot of this item to compare yet.