Browse docsTabs

Navigation

Glass Tabs

Tabs whose glass bubble stretches like a drop on its way to the selected tab.

pnpm dlx shadcn@4.14.1 add @glassyui/glass-tabs

Preview

A glass lozenge slides to the selected tab.

Demos ready. Update 0.

Installation

First add the exact @glassyui mapping to components.json as shown in Getting Started. Then run the pinned item command:

Install Glass Tabs

pnpm dlx shadcn@4.14.1 add @glassyui/glass-tabs
What this installs12 files, 2 packages

Direct registry declarations

These values belong to @glassyui/glass-tabs itself in registry.json.

Package dependencies

  • @radix-ui/react-tabs
  • clsx

Registry dependencies

  • @glassyui/glass-panel

File targets

  • components/glassyui/glass-tabs.tsx
  • components/glassyui/lib/liquid-motion.ts

Complete installed closure

This follows every namespaced registry dependency recursively and de-duplicates the packages and target files installed with this item.

Package dependencies

  • @radix-ui/react-tabs
  • clsx

Installed files

  • components/glassyui/glass-tabs.tsx
  • components/glassyui/lib/liquid-motion.ts
  • components/glassyui/glass-panel.tsx
  • components/glassyui/glass-surface.tsx
  • components/glassyui/lib/merge-refs.ts
  • components/glassyui/lib/refraction-map.ts
  • components/glassyui/lib/use-refraction-filter.tsx
  • components/glassyui/lib/scene-context.ts
  • components/glassyui/glass-provider.tsx
  • components/glassyui/liquid-filters.tsx
  • components/glassyui/lib/preferences.ts
  • components/glassyui/styles/liquid.css

Usage

Usage

import { GlassTabs, GlassTabsContent, GlassTabsList, GlassTabsTrigger } from "@/components/glassyui/glass-tabs";

export function TabsDemo() {
  return (
    <GlassTabs defaultValue="preview">
      <GlassTabsList>
        <GlassTabsTrigger value="preview">Preview</GlassTabsTrigger>
        <GlassTabsTrigger value="code">Code</GlassTabsTrigger>
      </GlassTabsList>
      <GlassTabsContent value="preview">Glass preview</GlassTabsContent>
      <GlassTabsContent value="code">Copy-ready code</GlassTabsContent>
    </GlassTabs>
  );
}

Examples

Default tab

<GlassTabs defaultValue="preview">...</GlassTabs>

API

GlassTabs

Radix Tabs root.

GlassTabsList

Glass pill list for triggers.

GlassTabsTrigger

Semantic Radix trigger with active glass styling.

GlassTabsContent

Panel-backed tab content.

Notes

Motion

One glass bubble serves the whole list. It lifts, stretches toward the new tab and settles with a small bounce. Until scripts run, the active tab draws its own bubble. Reduced motion moves it straight there.

Accessibility

Keep the Radix-backed semantics intact and preserve visible labels, focus states, and keyboard operation when copying the source.

Performance

Use provider quality preferences for dense app screens. Reserve strong refraction for hero or showcase surfaces.