kuratlielia

Expanding Button Group

Buttons 24

About

A compact row of icon action buttons where the one you point at or focus grows to reveal its label while neighbours slide aside, and an action can confirm in place with a check and a past-tense word.

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

Code

How Expanding Button Group is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import ExpandingButtonGroup from "@/components/ui/expanding-button-group";
import { Archive, Clock3, Forward, Reply, Trash2 } from "lucide-react";

export default function ExpandingButtonGroupDemo() {
  const items = [
    { id: "reply", label: "Reply", icon: <Reply />, onSelect: () => {} },
    { id: "forward", label: "Forward", icon: <Forward />, onSelect: () => {} },
    {
      id: "archive",
      label: "Archive",
      doneLabel: "Archived",
      icon: <Archive />,
      onSelect: () => true,
    },
    {
      id: "snooze",
      label: "Snooze",
      doneLabel: "Snoozed",
      icon: <Clock3 />,
      onSelect: () => true,
    },
    {
      id: "delete",
      label: "Delete",
      doneLabel: "Deleted",
      tone: "danger" as const,
      icon: <Trash2 />,
      onSelect: () => true,
    },
  ];

  return (
    <div className="flex min-h-[220px] w-full items-center justify-center bg-[var(--background)] p-10">
      <ExpandingButtonGroup
        label="Message actions"
        defaultExpanded="reply"
        items={items}
      />
    </div>
  );
}

Dependencies

More by kuratlielia

View all
  • Activity Heatmap

    Activity Heatmap

    524
  • Image Compare

    Image Compare

    227
  • Stats Band

    Stats Band

    168
  • User Menu

    User Menu

    119
  • Date Range Picker

    Date Range Picker

    111
  • Usage Meter

    Usage Meter

    83
  • Ridgeline Chart

    Ridgeline Chart

    70
  • Timeline

    Timeline

    62

More in Buttons

View all
  • Texture Button

    Texture Button

    122
  • Button

    Button

    172
  • HeroUI Button Group

    HeroUI Button Group

    1
  • Button

    Button

    88
  • Native Button

    Native Button

    7
  • Button

    Button

    74
  • Button Group

    Button Group

    5
  • Button

    Button

    21