Syed Hasnain

Category Dropdown

Navigation 12

About

A dropdown menu with vertical category tabs on one side and their items on the other, featuring a sliding tab indicator, animated height transitions, and a morphing chevron icon.

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

Code

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

Usage.tsx

import React from "react";
import { CategoryDropdown } from "@/components/ui/category-dropdown";

const categories = [
  {
    id: "conversation",
    label: "Conversation",
    items: [
      { id: "message-bubble", label: "Message Bubble" },
      { id: "prompt-input", label: "Prompt Input" },
    ],
  },
  {
    id: "tools",
    label: "Tools & execution",
    items: [
      { id: "tool-call", label: "Tool Call" },
      { id: "tool-approval", label: "Tool Approval" },
    ],
  },
];

export default function Example() {
  const [value, setValue] = React.useState("prompt-input");

  return (
    <div className="flex min-h-[320px] w-full items-start justify-center pt-16">
      <CategoryDropdown
        categories={categories}
        value={value}
        onValueChange={setValue}
      />
    </div>
  );
}

Dependencies

More by Syed Hasnain

View all
  • Color Picker

    Color Picker

    77
  • Cost Meter

    Cost Meter

    29
  • Quota Banner

    Quota Banner

    21
  • Message Scroller

    Message Scroller

    21
  • Commit

    Commit

    17
  • Image Generation Loader

    Image Generation Loader

    15
  • Attachments

    Attachments

    15
  • Citations

    Citations

    14

More in Navigation

View all
  • Sidebar

    Sidebar

    226
  • Tabs

    Tabs

    52
  • Navbar with Theme Toggle

    Navbar with Theme Toggle

    42
  • Breadcrumb

    Breadcrumb

    12
  • Nav List Card

    Nav List Card

    32
  • Pagination Ant

    Pagination Ant

    3
  • Pagination

    Pagination

    85
  • Pagination

    Pagination

    9