Syed Hasnain

Category Dropdown

Navigation 21

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

    204
  • Cost Meter

    Cost Meter

    55
  • Message Scroller

    Message Scroller

    45
  • Attachments

    Attachments

    43
  • Background Inbox

    Background Inbox

    39
  • Commit

    Commit

    38
  • Video Player

    Video Player

    31
  • Approval Card

    Approval Card

    31

More in Navigation

View all
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    76
  • Footer with Big Wordmark

    Footer with Big Wordmark

    40
  • Sidebar

    Sidebar

    392
  • Oversized 404 Numeral

    Oversized 404 Numeral

    78
  • Navbar with Theme Toggle

    Navbar with Theme Toggle

    67
  • NavBar

    NavBar

    2
  • Pagination

    Pagination

    109
  • Tabs like bookmark

    Tabs like bookmark

    82