A compact pill of icon buttons where hover or focus reveals labels and slides neighbours aside with inline confirmations.
Installation
Usage
import { Archive, Clock3, Forward, Reply, Trash2 } from "lucide-react";
import { ExpandingButtonGroup } from "@/components/arc/expanding-button-group/expanding-button-group";
export function MessageActions({ message }: { message: { id: string } }) {
return (
<ExpandingButtonGroup
label="Message actions"
defaultExpanded="reply"
items={[
{ id: "reply", label: "Reply", icon: <Reply size={16} />, onSelect: () => console.log("reply") },
{ id: "forward", label: "Forward", icon: <Forward size={16} />, onSelect: () => console.log("forward") },
{ id: "archive", label: "Archive", doneLabel: "Archived", icon: <Archive size={16} />, onSelect: () => console.log("archive") },
{ id: "snooze", label: "Snooze", doneLabel: "Snoozed", icon: <Clock3 size={16} />, onSelect: () => console.log("snooze") },
{ id: "delete", label: "Delete", doneLabel: "Deleted", tone: "danger", icon: <Trash2 size={16} />, onSelect: () => console.log("delete") },
]}
/>
);
}API Reference
ExpandingButtonGroup
| Prop | Type | Default | Description |
|---|---|---|---|
| items | ExpandingButtonGroupItem[] | — | Toolbar action items. |
| label | string | — | Accessible name of toolbar. |
| size | "sm" | "md" | "md" | Pill size geometry. |
| confirmDuration | number | 1400 | Duration in ms to display checkmark confirmation. |
Built by Otis
Last updated: 10/12/2026