Syed Hasnain

Category Dropdown

Navigation 22

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

    238
  • Cost Meter

    Cost Meter

    63
  • Message Scroller

    Message Scroller

    55
  • Attachments

    Attachments

    52
  • Background Inbox

    Background Inbox

    46
  • Commit

    Commit

    45
  • Approval Card

    Approval Card

    37
  • Environment Variables

    Environment Variables

    35

More in Navigation

View all
  • Footer with Big Wordmark

    Footer with Big Wordmark

    133
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    368
  • Meniscus — Liquid Bottom Navigation Bar

    Meniscus — Liquid Bottom Navigation Bar

    1
  • Sidebar

    Sidebar

    431
  • Pagination with Ellipsis

    Pagination with Ellipsis

    31
  • Button Breadcrumb

    Button Breadcrumb

    43
  • Pagination

    Pagination

    118
  • Navbar

    Navbar

    80