erictsai83

Highlight Tabs

Navigation

About

A Motion-powered tab list with a shared highlight indicator and keyboard navigation.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Highlight Tabs to your project and fits it to your theme.

Code

How Highlight Tabs is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { useState } from "react";

import { HighlightTabs } from "@/components/ui/ericts-highlight-tabs";

const highlightTabItems = [
  { value: "overview", label: "Overview" },
  { value: "activity", label: "Activity" },
  { value: "settings", label: "Settings" },
];

export default function Preview() {
  const [activeTab, setActiveTab] = useState(highlightTabItems[0].value);
  const activeLabel =
    highlightTabItems.find((tab) => tab.value === activeTab)?.label ??
    "Overview";

  return (
    <div className="flex flex-col items-center gap-4">
      <HighlightTabs
        tabs={highlightTabItems}
        value={activeTab}
        onValueChange={setActiveTab}
        aria-label="Workspace sections"
      />
      <div className="min-w-64 rounded-lg border bg-background px-4 py-3 text-center">
        <p className="text-sm font-medium">{activeLabel}</p>
        <p className="mt-1 text-xs text-muted-foreground">3 recent changes</p>
      </div>
    </div>
  );
}

Dependencies

More by erictsai83

View all
  • Adaptive Drawer

    Adaptive Drawer

  • Status Button

    Status Button

  • Floating Shortcut Button

    Floating Shortcut Button

  • Filter Tags

    Filter Tags

  • Feedback Popover

    Feedback Popover

  • Expandable Toolbar

    Expandable Toolbar

  • Expandable Toggle Button

    Expandable Toggle Button

  • Arc Menu

    Arc Menu

More in Navigation

View all
  • Footer with Big Wordmark

    Footer with Big Wordmark

    163
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    437
  • Meniscus — Liquid Bottom Navigation Bar

    Meniscus — Liquid Bottom Navigation Bar

    31
  • Sidebar

    Sidebar

    444
  • Tabs

    Tabs

    38
  • Pagination

    Pagination

    119
  • Sidebar

    Sidebar

    367
  • Stacked Circular Footer

    Stacked Circular Footer

    469